> I am new to Lucene and facing a problem while performing
> searches. I am using lucene 2.2.0.
> 
> My application indexes documents on "keyword" field which
> contains integer values. 

Which analyzer/tokenizer are you using on that field? I am assuming it is a 
tokenized field.

>If the value is negative the query does not return
> correct results.

Is it returning 1's as well as -1's?

- is a special character so you have to escape it when querying.
So keyword:\-1 is correct. But the problem is StandardTokenizer tokenizes 
-1 to 1. If you use it all -1's and 1's are threated same. Use 
whitespaceanalyzer instead.

Hope this helps.



      

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to