[Ferret-talk] Wildcard trouble
Jens Kraemer
jk at jkraemer.net
Tue Feb 10 04:15:56 EST 2009
Hi Paul,
On 07.01.2009, at 01:17, Paul Lynch wrote:
> Hi-- I just ran into an odd situation. If I do a search including
> the term:
> c* - I get 4 hits
> ca* - I get the same 4 documents
> co* - I get one new document, not found by c*
>
> Does anyone know what might be going on, or have suggestions for
> debugging?
How does your full query look like? Ferret has a built in default
limit of 512 for the number of terms wildcard queries (and other
MultiTermQueries) can get expanded to. Any more terms matching your
criteria will be dropped then, keeping the most relevant 512 terms.
You can override this value by specifying a max_terms value when
constructing the query via the API:
query = WildcardQuery.new(:field, "c*",
:max_terms => 1024)
you might also try monkey patching the
Ferret::Search::MultiTermQuery::default_max_terms method to return
your custom limit so you dont need to use the query API to construct
your queries (i.e. with aaf which doesn't reliably work with query
objects due to the DRb stuff involved).
It *might* also be a bug in Ferret - if the above doesn't help, can
you reproduce this with a simple test case?
cheers,
Jens
--
Jens Krämer
Finkenlust 14, 06449 Aschersleben, Germany
VAT Id DE251962952
http://www.jkraemer.net/ - Blog
http://www.omdb.org/ - The new free film database
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
URL: <http://rubyforge.org/pipermail/ferret-talk/attachments/20090210/19ca694c/attachment.bin>
More information about the Ferret-talk
mailing list