: quick. I'm using Lucene version 2.4.1
        ...
: and QueryParser. The search results between the two queries are now in 
: different orders while the number of results are the same. I have one 

: Old Way
: QueryParser parser = new QueryParser("words", analyzer);
: Query q = parser.parse("+words:(one two) +year:[1950 2010]");
        ...
: New Way
        ...
: q.add(new RangeQuery(new Term("year", 1950), new Term("year", 2010), true), 
Occur.MUST);


You are using RangeQuery which takes into account the idf of each term ... 
QueryParser (in 2.4) uses ConstantScoreRangeQuery instead.

I would change your new code to use ConstantScoreRangeQuery and go with 
that (the order will be determed based on the score of the "words" not the 
dates -- that's typically what people want)

-Hoss


---------------------------------------------------------------------
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