I have seen that if I set the value of queryResultWindowSize to 0 in
solrconfig.xml solr will return an error of divided by zero.
Checking the source I have seen it can be fixed in SolrIndexSearcher. At the
end of the function getDocListC it's coded:
if (maxDocRequested < queryResultWindowSize) {
supersetMaxDoc=queryResultWindowSize;
} else {
supersetMaxDoc = ((maxDocRequested -1)/queryResultWindowSize +
1)*queryResultWindowSize;
if (supersetMaxDoc < 0) supersetMaxDoc=maxDocRequested;
}
I have sorted it oud doing (just addin parenthesis):
if (maxDocRequested < queryResultWindowSize) {
supersetMaxDoc=queryResultWindowSize;
} else {
supersetMaxDoc = ((maxDocRequested -1)/(queryResultWindowSize +
1))*queryResultWindowSize;
if (supersetMaxDoc < 0) supersetMaxDoc=maxDocRequested;
}
I have seen this is happening in a recent trunk. Is my fix correct?
--
View this message in context:
http://www.nabble.com/error-when-seting-queryResultWindowSize-to-zero-tp23508478p23508478.html
Sent from the Solr - User mailing list archive at Nabble.com.