lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Omri Suissa <omri.sui...@diffdoof.com>
Subject Extending QueryParser to properly handle numeric fields
Date Sun, 17 Feb 2013 16:03:49 GMT
Hi,
I want to extend QueryParser to properly handle numeric fields.
I found a lot of info about it on the java mailing list.
One of the resolutions to this problem looks very good:
override GetRangeQuery and create NumericRangeQuery.

But, here is my problem, in all examples the code is looks like this:

int num1 = Integer.parseInt(part1);
int num2 = Integer.parseInt(part2);
Query q = NumericRangeQuery.newIntRange(field, num1, num2, inclusive,
inclusive);

where part1 and part2 are the 2 parts of the range.

when i search for "price:[1 TO 10]" i get in part1: "price:[1" and in
part2: "price:[1 TO 10]".

why is that?
there is a difference between the Java version and the .net version of the
QueryParser?
or this is a bug in the .net version?

Thanks,
Omri

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message