[Xapian-discuss] QueryParser and ValueRanges
Stefan Demharter
stefan.demharter at gmx.net
Wed Sep 16 17:31:47 BST 2009
Hi,
i want to use a QueryParser with a StringValueProcessor.
The strings should be allowed to have some special characters.
If i use QueryParser as in the file attached, i don't get the desired
results - i.e. the query is not always a single value-range query.
The results are:
a..b => Xapian::Query(VALUE_RANGE 1 a b)
a/b..b => Xapian::Query(VALUE_RANGE 1 a/b b)
a_d..b => Xapian::Query(VALUE_RANGE 1 a_d b)
a$d..b => Xapian::Query(VALUE_RANGE 1 a$d b)
a.d..b => Xapian::Query(VALUE_RANGE 1 a.d b)
a,d..b => Xapian::Query(VALUE_RANGE 1 a,d b)
a+d..b => Xapian::Query((a:(pos=1) FILTER VALUE_RANGE 1 d b))
a;d..b => Xapian::Query((a:(pos=1) FILTER VALUE_RANGE 1 d b))
a*b..b => Xapian::Query((a:(pos=1) FILTER VALUE_RANGE 1 b b))
a#d..b => Xapian::Query((a:(pos=1) FILTER VALUE_RANGE 1 d b))
"a b"..b => Xapian::Query(((a:(pos=1) PHRASE 2 b:(pos=2)) FILTER
VALUE_RANGE 1 b))
As you can see the QueryParser works as expected for the first 6
queries. But the last 4 queries aren't parsed as expected, even if I
quote the search text. Is this a bug? Or is there some kind of
workaround for this problem?
Greetings
Stefan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xapian_string_value_ranges.cpp
Url: http://lists.xapian.org/pipermail/xapian-discuss/attachments/20090916/ef660708/attachment.txt
More information about the Xapian-discuss
mailing list