On 9/9/06, Stuart Rackham <[EMAIL PROTECTED]> wrote:
> The included test script turned up the following anomolies (run
> against Ferret 0.10.3, but had same problems with 0.10.2):
>
> 1. When the content word is not in the index the inclusion of a
>    wildcard file term causes search_each to throw a segmentation
>    fault.
>
>   $ ./test.rb zzz file:*.txt
>   query: +content:zzz +file:*.txt
>   ./test.rb:28: [BUG] Segmentation fault
>   ruby 1.8.4 (2005-12-24) [i486-linux]
>
>   Aborted

Thanks Stuart. This is fixed in subversion. I'll put another gem out ASAP.

> 2. When the file query term is file:* wildcard the parser
>    translates it to +* instead of +file:*
>
>   $ ./test.rb one file:*
>   query: +content:one +*
>   file: f1.txt
>
> Am I missing something here?

"*" matches everything including empty strings. So basically it will
match documents that don't even contain the :file field. I've
therefore optimized it to a MatchAllQuery. Before doing this "*" was
pretty much unusable in large indexes since it would create a massive
MultiTermQuery with every term in the index (as long as you set the
:max_clauses parameter of QueryParser large enough to accept them
all).

Now, if you do need to only match documents that contain the desired
field you can do it like this;

$ ./test.rb one file:?*

Hope that makes sense.

Dave
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to