[Xapian-discuss] newb: QueryParser Flags and Enquire

James Aylett james-xapian at tartarus.org
Sun Apr 22 11:05:21 BST 2007


On Sat, Apr 21, 2007 at 10:39:30PM -0400, Ram Peters wrote:

> Can someone explain to me what these flags mean (I am using Python
> binding)?

As the documentation for the bindings says, you should generally
consult the API documentation to find out what the various classes,
functions and so forth do.

>        xapian.QueryParser.FLAG_BOOLEAN
>        xapian.QueryParser.FLAG_PHRASE
>        xapian.QueryParser.FLAG_LOVEHATE
>        xapian.QueryParser.FLAG_BOOLEAN_ANY_CASE

>From <http://tinyurl.com/yw7rjm>:

FLAG_BOOLEAN		Support AND, OR, etc and bracketted subexpressions.
FLAG_PHRASE		Support quoted phrases.
FLAG_LOVEHATE		Support + and -.
FLAG_BOOLEAN_ANY_CASE	Support AND, OR, etc even if they aren't in
			  ALLCAPS.
FLAG_WILDCARD		Support right truncation (e.g. Xap*).

> Also what is offset and count?
> eg:
> mset = enquire.get_mset(offset, count)

>From <http://tinyurl.com/yty256> (you aren't quoting the parameter
names, but presumably variable names from an example script you were
looking at?):

first     the first item in the result set to return. A value of zero
	  corresponds to the first item returned being that with the highest
	  score. A value of 10 corresponds to the first 10 items being ignored,
	  and the returned items starting at the eleventh.

maxitems  the maximum number of items to return.

J

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org



More information about the Xapian-discuss mailing list