[Xapian-discuss] Less than, greater than?
rm at fabula.de
rm at fabula.de
Wed Feb 9 15:32:32 GMT 2005
On Wed, Feb 09, 2005 at 10:29:41AM -0500, Eric B.Ridge wrote:
> On Feb 9, 2005, at 9:51 AM, John Wards wrote:
> >Doh..so it is.
> >
> >It was a bit of a long shot as I suppose.
>
> Not really. You can do it like some of us do wildcard searches.
>
> For greater than, get a TermIterator from the Database, skip_to() the
> starting price and include all the prices after in your query, OR'd
> together as a group. For less than, start at the beginning of the
> TermIterator and stop when you hit the end price.
Hmm, but the big caveat here is: prices tend to be numeric and don't sort
in alphabetic order ...
RalfD
> I'm assuming you've got a term in each document like XP5.00 that would
> represent a field named Price with a value of five bucks.
>
> I think a custom MatchDecider would work too. Here you could use an
> indexed value of each document to make the decision, but I think this
> happens across the entire set of documents that match your initial
> query, not in-line with the query matching.
>
> eric
>
>
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss at lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss
More information about the Xapian-discuss
mailing list