lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Derek Baker <de...@idexx.com>
Subject Re: range query problems
Date Fri, 17 Sep 2004 19:29:08 GMT
Thanks for your reply.

If I do it manually:

    Term term1 = new Term("adzer", "#");
    Term term2 = new Term("adzer", "0");
    Query myQuery = new RangeQuery(term1, term2, true);
    hits = searcher.search(myQuery);

I still get nothing. If I make the first term in the new RangeQuery call 
null:

    Query myQuery = new RangeQuery(null, term2, true);

I get nothing. If, however I make the second term in the new RangeQuery 
call null:

    Query myQuery = new RangeQuery(term1, null, true);

I get the results I expect.

Seems very strange.

Derek

Daniel Naber wrote:

>On Friday 17 September 2004 19:37, Derek Baker wrote:
>
>  
>
>>However, if I create a range query that I would expect to find that
>>value, I get nothing. The range query string is: "adzer:[# TO 0]" (minus
>>the quotes). As far as I can tell, this query string should find any
>>value in the adzer fields that starts with a "-".
>>    
>>
>
>Did you try building that query manually? Maybe even starting from null 
>instead of #.
>
>Regards
> Daniel
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message