I have a number of documents indexed by Solr 3.5 that contain date fields (solr.DateField) among others. Now I am requesting the Solr component, which should not return any results:
http://example.com/solr/select?fq=sis_field_int:1000& stats=true&stats.field=ds_field_date
and get an error
HTTP Status 500 - / by zero java.lang.ArithmeticException: / by zero at org.apache.solr.handler.component.DateStatsValues.addTypeSpecificStats (StatsValuesFactory.java:384) at ...
If I send a request without statistics or specify any field without a date, I get the expected response without any results. This is similar to a Solr error that is trying, for example. to calculate the average value in this case. Unfortunately, I did not find references to this problem. Is there a way around or solving the problem?
You're right, the problem is calculating the average:
res.add("mean", new Date(sum / count));
sum count long. count , ArithmeticException. , . , , count , , , .
sum
count
long
ArithmeticException
, , double, , NaN. StatsValues, .
double
NaN
StatsValues
UPDATESOLR-3160 jira , . Solr !