[Xapian-discuss] Custom Stemmng and QueryParser

Matthew Somerville
2008-08-12T14:09:39Z

Mike Boone wrote:
> I have the query "IIS and sharp". IIS is a custom stem, so the
query
> goes to the QueryParser as "XZiis and sharp". The QueryParser
> translates this into Xapian::Query((xziis:(pos=1) AND
> Zsharp:(pos=2))).

Yes, as it ignores case and assumes you've just given it words (don't
you
have to have "and" in upper case, though? You said you had
FLAG_BOOLEAN, not
FLAG_BOOLEAN_ANY_CASE).

 > In this case, I don't want the functionality where
the
> user can put in their own prefix with a colon.

Just don't tell them about it? :) Have something stupid, e.g.:

     add_prefix("wangleflooble", "XZ")

and then convert "IIS and sharp" into "wangleflooble:IIS and
sharp" before
feeding to QueryParser.

ATB,
Matthew