[Xapian-discuss] wildcards and prefix searches
Olly Betts
olly at survex.com
Fri Aug 22 02:53:35 BST 2008
On Thu, Aug 21, 2008 at 12:12:30PM +1000, Donncha Redmond wrote:
> I'm using Xapian through acts_as_xapian and would like to know why
> trailing wildcards do not work on prefix searches.
>
> Specifically, I have a Merchant model with a Description field, mapped
> to the prefix "desc".
>
> If I then search for "desc:goods" I get 4 matches, but if I search for
> "desc:goo*" I get 0.
>
> However, when searching normal, non-prefixed fields, "goo*" would
> return at least the same amount of matches as "goods".
>
> Anyone know how I can configure Xapian to support trailing wildcards
> on prefixes?
This should just work (and there's a C++ feature test for it:
qp_flag_wildcard2 in queryparsertest).
So I guess the issue is probably in acts_as_xapian (which you'd have to
ask Francis about) or Xapian's ruby bindings.
Can you supply a self-contained example which reproduces this? Ideally
without acts_as_xapian being involved if it's for me to look as I know
nothing about ruby on rails.
Cheers,
Olly
More information about the Xapian-discuss
mailing list