lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com.INVALID>
Subject IllegalArgumentException: docID must be >= 0 and < maxDoc=48736112 (got docID=2147483647)
Date Fri, 29 May 2015 12:18:39 GMT
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 log(0)), but exception looks like equally

awkward and uniformative.

Do you think is this something improvable? Can we do better handling here?
 
Thanks,
Ahmet

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message