This seems an known issue: http://wiki.apache.org/solr/StatsComponent TrieFields has to use a precisionStep of -1 to avoid using UnInvertedField.java. Consider using one field for doing stats, and one for doing range facetting on.
To fix this problem. and support dacet search on this field, I have to create another field, with precisionStep="2147483647"(Integer,MAX_VALUE), this is not good, as it takes more disk size, and it's hard to explain to customers why we need this field. Seem this problem is already reported and tracked by https://issues.apache.org/jira/browse/SOLR-2976, but there is no update since 03/Jan/12. Does Solr team have any plan to fix this problem? The follwing is my test result: I have 2 fields, one field is effectiveSize_tl, type:TrieLongField, precisionStep="8", default setting. One field is ctime_tdt: type: TrieDateField, precisionStep="6", default setting. I also create 2 another fields: effectiveSize_tlMinus, same as effectiveSize_tl, except precisionStep="2147483647". ctime_tdtMinus, same as ctime_tdt, except precisionStep="2147483647". http://localhost:5678/solr/select?q=*:*&rows=0&stats=true&stats.field=effectiveSize_tl&stats.facet=ctime_tdt <str name="msg">Invalid Date String:'\#8;'</str> http://localhost:5678/solr/select?q=*:*&rows=0&stats=true&stats.field=effectiveSize_tl works http://localhost:5678/solr/select?q=*:*&rows=0&stats=true&stats.field=ctime_tdt works This works correctly: - using both precisionStep="2147483647" fields: http://localhost:5678/solr/select?q=*:*&rows=0&stats=true&stats.field=effectiveSize_tlMinus&stats.facet=ctime_tdtMinus This doesn't throw error, but the result is totoally not correct. http://localhost:5678/solr/select?q=*:*&rows=0&stats=true&stats.field=effectiveSize_tlMinus&stats.facet=ctime_tdt http://localhost:5678/solr/select?q=*:*&rows=0&stats=true&stats.field=effectiveSize_tl&stats.facet=ctime_tdt throw exception: <str name="msg">Invalid Date String:'\#8;'</str> http://localhost:5678/solr/select?q=*:*&rows=0&stats=true&stats.field=effectiveSize_tl&stats.facet=ctime_tdtMinus still throw exception <str name="msg">Invalid Date String:' #1;#0;#0;#0; #8;t#1;#20;#0;'</str> -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-stats-facet-on-TrieField-doesn-t-work-tp4028175.html Sent from the Solr - User mailing list archive at Nabble.com.