Jason,

Thanks, but changing it to '05' or '05L' in the code didn't seem to work,
hits.length() still returns 0 when the document should be found.

If you make just one change in the example:

      Hits hits = searcher.search(query);
      //Hits hits = searcher.search(fq);

IndexSearcher finds a match and populates the hits object. The issue seems to be in the
filter (which is built using RangeFilter.Less) and the FilteredQuery.

In the RangeFilter class, using 'Less' or 'More' gives you matches lower or higher than a set boundary:

Filter filter=RangeFilter.Less("num",NumberTools.longToString(10L)); // field num < 10
...
FilteredQuery fq = new FilteredQuery(query,filter);

The NumberTools.longToString() method is supposed to replace padding leading 0's eliminating string comparison issues.

Hopefully, someone can help.

Peter W.



On Jun 28, 2006, at 5:21 PM, Jason Pump wrote:

It's a string comparison. Make the "5" a "05" would be a simple workaround.

Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to