Timothy Potter created SOLR-8106: ------------------------------------ Summary: stats for long field (e.g. _version_) are not accurate Key: SOLR-8106 URL: https://issues.apache.org/jira/browse/SOLR-8106 Project: Solr Issue Type: Bug Reporter: Timothy Potter
I have a need to get the min and max values for the _version_ field and the stats component is returning the values in scientific notation, leading to inaccurate values. Here's an example {code} http://localhost:8984/solr/perf_shard1_replica1/select?q=*%3A*&sort=_version_+desc&rows=1&fl=_version_&wt=json&indent=true&stats=true&stats.field=_version_ { "responseHeader":{ "status":0, "QTime":107, "params":{ "fl":"_version_", "sort":"_version_ desc", "indent":"true", "stats.field":"_version_", "stats":"true", "q":"*:*", "wt":"json", "rows":"1"}}, "response":{"numFound":846744,"start":0,"docs":[ { "_version_":1513129610695409665}] }, "stats":{ "stats_fields":{ "_version_":{ "min":1.51312925387967693E18, "max":1.51312961069540966E18, "count":846744, "missing":0, "sum":1.281233266882899E24, "sumOfSquares":1.9386717640368418E42, "mean":1.51312943095303782E18, "stddev":5.0882203289794446E11}}}} {code} If you convert the max value from Double to Long you get {{1513129610695409664}} but the actual is {{1513129610695409665}} As you can see, doing a top 1 (sort desc) gives the correct value as a long. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org