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

Matthew Somerville matthew at mysociety.org
Thu May 15 17:35:58 BST 2008

Jesper Krogh wrote:
> I have acc listed as a boolean prefix.

Do you mean you have something like:
     $queryparser->add_boolean_prefix('acc', 'Q');
or something else?

> I have some terms like Q1W2E3 that is listed as boolean prefixes.

Do you mean you have a document in your database that has Q1W2E3 as a term? 
I'm guessing not because of what you say below, so what is the term you have 
entered in the database for the ID "Q1W2E3"?

 > This is essential ID's.. so I really dont want the stemming algorithm to
> accidentally stumble over them. But then if the id happens to be start with an
> upper-case letter it gets fed to the search like this:
> Search:
> acc:Q1W2E3
> Running query 'Xapian::Query(0 * ACC:Q1W2E3)'

This doesn't sound like a stemming issue (though I could be wrong :) ). If I 
have "acc" as a boolean prefix here with the above queryparser line, a query 
for acc:Q1W2E3 to QueryParser becomes:
     Xapian::Query(0 * QQ1W2E3)
and if I don't have "acc" as a boolean prefix, it becomes:
     Xapian::Query((acc:(pos=1) PHRASE 2 q1w2e3:(pos=2)))
ie. it's treated as a phrase search.

Do you have some short example code that exhibits the issue?


More information about the Xapian-discuss mailing list