Hello List,
When a similarity returns NEGATIVE_INFINITY, hits[i].doc becomes 2147483647.
Thus, exception is thrown in the following code:
for (int i = 0; i hits.length; i++) {
int docId = hits[i].doc;
Document doc = searcher.doc(docId);
}
I know it is an awkward to return infinity (comes from
Hi Ahmet,
Its due to the use of sentinel values by your collector in its
priority queue by default.
TopScoreDocCollector warns about this, and if you turn on assertions
(-ea) you will hit them in your tests:
* pbNOTE/b: The values {@link Float#NaN} and
* {@link Float#NEGATIVE_INFINITY} are
: Now StandardTokenizer(Version, Reader) is deprecated and the docs say
: to use StandardTokenizer(Reader) instead. But I can't do that, because
: that constructor hardcodes Version.LATEST, which will break backwards
: compatibility in the future (its Javadoc even confirms that this is
: the