[Xapian-discuss] example of using the new OP_VALUE_RANGE in Query

Olly Betts olly at survex.com
Tue Jun 12 02:51:00 BST 2007


On Mon, Jun 11, 2007 at 06:27:56PM -0700, Andrey wrote:
> I wonder anyone can put an example of uisng OP_VALUE_RANGE in xapian.Query?
> 
> such as search the term 'xapian', with attachment num 1 - 4   (attachment 
> num store in value(0) )

Something like this:

    query = xapian.Query('xapian')
    range = xapian.Query(xapian.Query.OP_VALUE_RANGE, 0, '1', '4')
    query = xapian.Query(xapian.Query.OP_FILTER, query, range)

> Is the NumberValueRangeProcessor fixed in xapian 1.0.1?

No, though there is at least now a warning in the documentation.
There's a preliminary patch in bugzilla, but the encoding to use isn't
finalised yet.

Cheers,
    Olly



More information about the Xapian-discuss mailing list