[Xapian-discuss] Spaces in bool prefixes

Rick Olson rick at napalmriot.com
Thu Feb 21 03:15:50 GMT 2008


I see that in xapian-core/queryparser/queryparser_internal.cc there is 
the following comment:

// Can't boolean filter prefix a subexpression or
// phrase; just use anything following the prefix
// until the next space or ')' as part of the boolean
// filter term.


What is the reason for this limitation, and how can I overcome it in the 
event that I want to FILTER on a phrased term?

For instance, I have:
	add_boolean_prefix('X_Country:', 'country');
which works until you come across a country with more than one word, 
such as United States.

Term List for record #545: X_country:united states

$query = 'country:"united states"';

Parsed query was: Xapian::Query((states:(pos=1) FILTER X_country:"united))


Is there a better way to FILTER out multi-word phrases like I'm trying 
to do, such as using values, or is it just not possible? (My version of 
xapian is 1.0.5).


Thanks,

Rick



More information about the Xapian-discuss mailing list