[Xapian-discuss] STEM_SOME and prefixes.. (even boolean)

Olly Betts olly at survex.com
Thu May 15 19:08:50 BST 2008


On Thu, May 15, 2008 at 01:50:16PM +0200, Jesper Krogh wrote:
> Search:
> acc:Q1W2E3
> 
> Running query 'Xapian::Query(0 * ACC:Q1W2E3)'
> 
> As far as I can tell the query with a : will never match anything in the
> index?

The issue here is that given the term ACCQ1W2E3, how do you say what the
prefix is?  You're wanting it to be ACC, but it could be ACCQ, AC, or
just A.

So when adding a multi-character term prefix, we insert a ':' if the
term starts with a capital so that the prefix/term boundary isn't lost.
Obviously this needs to happen at index time too, or as you say the term
with the colon will never match.

There's also an assumption in some places that you follow the convention
that multicharacter prefixes only start with 'X' (I think only in Omega
but I'm not certain).

Cheers,
    Olly



More information about the Xapian-discuss mailing list