Re: PointInSetQuery dose not terminate early if DocIdSetBuilder's bitSet is null

2020-10-22 Thread hacker win7
Hi, Adrien Grand Could we check the result after BKD.intersect() inner the PointInSetQuery.scorer(), if the result.build.iterator() the first next doc is already NO_MORE_DOCS ? We need not to build scorer with new ConstantScoreScorer() , just return null. In this way, the BooleanQuery for AND

Re: PointInSetQuery dose not terminate early if DocIdSetBuilder's bitSet is null

2020-10-16 Thread hacker win7
Is there any reasons for this why PointInsetQuery return NO_MORE_DOCS instead of NULL while NULL can terminate early. hacker win7 hackersw...@gmail.com > On Sep 29, 2020, at 11:59, hacker win7 wrote: > > Thanks Adrien Grand > > We store long numbers in our points, in our search service, mo

Re: PointInSetQuery dose not terminate early if DocIdSetBuilder's bitSet is null

2020-09-28 Thread hacker win7
Thanks Adrien Grand We store long numbers in our points, in our search service, most search requests look like this: id-match AND range match AND string match AND …. (Clause count is high) Id is long number and we find most searches of id-match query have no points at all but the subsequent Su

Re: PointInSetQuery dose not terminate early if DocIdSetBuilder's bitSet is null

2020-09-28 Thread Adrien Grand
What are you storing in your points? If you are storing numbers, I wonder if a better approach to this problem might be to start leveraging IndexOrDocValuesQuery and scorerSupplier() for point-in-set queries like we did for range queries. The approach you suggested would help in some cases, but I'

PointInSetQuery dose not terminate early if DocIdSetBuilder's bitSet is null

2020-09-27 Thread hacker win7
Hi Lucene developers, In Lucene-7.7.0, I find that in `PointInSetQuery.createWeight()`, and in the method `scorer()` after `values.intersect()`, if the `result.bitSet` is null, then the `result.build()` would use `concat()` to generate a Buffer and the length is 1. And the element of array is `