Mailing List Archive

Does CustomScoreProvider skip some documents when calculating custom scores?
Hi!

I am using Lucene 5.2.1.
I have indexed a "big" table of about 30000 entries.
I have a query with 2 simple sub TermQuery, the second one requiring a
custom score (with CustomScoreQuery and CustomScoreProvider);
all the matching hits (300) have the correct id but problem with the
calculation of the custom score: all of the 300 hits - except 6 of them -
receive a correct score, the scores of the 6 are not correct and, for them,
the overriden customScore method of the provider is not even entered.

I have made a second test with the same db but selecting and indexing only
these 6 entries; hits and scores are then OK and the customScore method of
CustomScoreProvider is correctly entered.

Indexing 30000 entries results in 9 LeafReaderContext while 6 entries
results in 1 only.

I don't understand why this error. Would a kind and competent Lucene user
have an explanation for this?
Many thanks for the help.

Claude Lepère
claudelepere@gmail.com