Hi Lucene members,

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 `NO_MORE_DOCS`.

Why not return null in the method `scorer()` if `result.bitSet` is null ?

In the following case:

SubQuery1 AND SubQuery2 AND SubQuery3 …...

BooleanWeight.scorerSupplier() -> 

the first subScorer of query is PointInSetQuery -> 

scorer() ->

after intersect if result.bitSet is null, there is no specific point value at 
all then return null ->


This will terminate early inner the BooleanWeight.scoreSupplier() because 
subScore is null and the boolean clause is required

The following SubQuery2, SubQuery3, SubQuery4 …. Need not to call 
scorerSupplier() to build scorer



hacker win7
hackersw...@gmail.com



Reply via email to