lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohammad Norouzi" <mnr...@gmail.com>
Subject two questions about NumberTools
Date Mon, 16 Jul 2007 07:01:13 GMT
Hello
I have problem in range queries, for example, I have queries like "field:[1
TO 25]" or "field:[1.1 TO 11.25]"
currently these queries not work. field:[20 TO 25] works fine but when the
both limits of the range have different number of digits the query won't
work. so the solution is NumberTools.

1 - the NumberTools utility has two methods longToString() and
stringToLong(). how about the double or float  numbers?? I think it should
be extends to support more data types

2 - suppose we are indexing a bunch of information and a field is in long
that we need to apply range queries on that later.
now I have a query like "fieldone:(just for test) AND field_long:[1 TO 25]",
the question is whether this query returns correct result? because
field_long already encoded with longToString() method and in the index files
you can't find any real value say, 1 or 25 or 10 ...
do I need to use stringToLong() method while I am building query?


any comment would be of great help

-- 
Regards,
Mohammad
--------------------------
see my blog: http://brainable.blogspot.com/
another in Persian: http://fekre-motefavet.blogspot.com/

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