RE: Query needsScores

2015-06-29 Thread Uwe Schindler
Hi Dat, no we cannot remove that. In Lucene 5, Filters are deprecated and will disappear completely soon. Filtering is also done by the Query class (in fact the backwards compatibility abstract Filter class now extends Query). The needsScore is used to tell the Query if the consumer needs

Re: Query needsScores

2015-06-29 Thread Đạt Cao Mạnh
Hi Uwe, But I think passing around needsScore flag from searcher, collector, query, weight, scorer is not a neat solution. On Mon, Jun 29, 2015 at 5:29 PM, Uwe Schindler u...@thetaphi.de wrote: Hi Dat, no we cannot remove that. In Lucene 5, Filters are deprecated and will disappear

Re: Query needsScores

2015-06-29 Thread Đạt Cao Mạnh
Hi Andrien, I mean can we centralise the check of flag in one place create different classes based on the checking? On Mon, Jun 29, 2015 at 6:01 PM, Adrien Grand jpou...@gmail.com wrote: Actually passing the needsScore flag from collector to Weight is exactly why we did this change: collectors

Re: Query needsScores

2015-06-29 Thread Adrien Grand
We could do that but it doesn't look to me like it would help. Can you give a concrete example of a class that you would like to split based on the value of needsScores? On Mon, Jun 29, 2015 at 5:00 PM, Đạt Cao Mạnh caomanhdat...@gmail.com wrote: Hi Andrien, I mean can we centralise the check

Re: Query needsScores

2015-06-29 Thread Adrien Grand
Actually passing the needsScore flag from collector to Weight is exactly why we did this change: collectors can now tell whether they need scores or not so that we can optimize query execution. Before we did this change, we had to rely on users to build an optimized query and for instance put a