[Xapian-discuss] Omega and Wildcards
Richard Boulton
richard at lemurconsulting.com
Wed Oct 3 09:48:04 BST 2007
Kenneth Loafman wrote:
> I made the following changes to Omega, per the instructions in
>
> http://www.xapian.org/docs/queryparser.html,
>
> and wildcards do not work at all. I'm hoping its something simple.
>
> /usr/lib/cgi-bin/omega/omega DB=pdf P=finan\*
> (with or without the backslash)
>
> returns no documents, even though there are over 3000 hits for
> 'finance', about the same for 'financial', and probably more.
(I'm assuming your diff is reversed, so that "-" lines are those which
you added. If that's wrong, I'm very confused.)
It looks like you've changed the flags for the query parser
"parse_query" invocation correctly. However, you've moved the
"qp.set_database(db)" call to after this invocation. As a result, the
wildcard expansion code can't lookup the terms in the database, so you
end up with no matches.
I expect it will work if you move the set_database() call back to its
original location.
--
Richard
More information about the Xapian-discuss
mailing list