we are still issueing a search even if the one provided keyword is too small. for example, see http://www.observer.com/fsearch?filter0=123 (our minimum length is 4)

Comments

douggreen’s picture

I don't get the same error. Please make sure that you have views_fastsearch.module 1.2.2.13 that has the following check on line 140:

      // if there aren't any words
      if ($word_count == 0) {
        $query->add_where($filter['operator'] == 'AND+' ? '1' : '0');
        return;
      }
yhager’s picture

I am getting the error with a later version of the views_fastsearch.module (1.2.2.18).

The check above does appear on line 162, however, searching for a small keyword gives me the following error:

warning: array_fill() [function.array-fill]: Number of elements must be positive in <snip>/sites/all/modules/views_fastsearch/views_fastsearch.module on line 272.
yhager’s picture

Please ignore my last comment. It appears I am getting this error for *all* searches besides small keywords :)

I'll continue researching and open an issue if I find something.

douggreen’s picture

Thanks! I just released this version yesterday. It uses some new logic for even faster searches. Please read the release notes. The error you are getting is in the old method of doing queries, that I still need to debug.

douggreen’s picture

The latest build should fix the php error. I still need to do some debugging to make sure that it's generating the right queries.

douggreen’s picture

btw, I think that the small words are being excluded properly. I just tested with both the old search and the UNIQUE search, and both seem to work.

yhager’s picture

my bad for not reading the release notes before trying the version.. thanks for noting that..

douggreen’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)