Dear all, I am running a grouped query including facets in my Junit Test cases against a Solr 4.2.1 Embedded Server. When faceting the groups, I want the counts to reflect the number of groups, not the number of documents. But when I enable "&group.facet=true" on the query, the test fails with the following message:
*** BEGIN testSearchByQuery(com.test.InsaneFieldCacheTest): Insane FieldCache usage(s) *** VALUEMISMATCH: Multiple distinct value objects for SegmentCoreReader(owner=_0(4.2.1):C12)+course_id 'SegmentCoreReader(owner=_0(4.2.1):C12)'=>'course_id',class org.apache.lucene.index.SortedDocValues,0.5=>org.apache.lucene.search.FieldCacheImpl$SortedDocValuesImpl#297645694 (size =~ 320 bytes) 'SegmentCoreReader(owner=_0(4.2.1):C12)'=>'course_id',int,org.apache.lucene.search.FieldCache.NUMERIC_UTILS_INT_PARSER=>org.apache.lucene.search.FieldCacheImpl$IntsFromArray#758496471 (size =~ 80 bytes) *** END testSearchByQuery(com.test.InsaneFieldCacheTest): Insane FieldCache usage(s) *** When disabling the group.facet, the test runs as expected. I found a related issue where the same field was used for the facet and the group. I verified, the given query does not use the "course_id" field twice. The error message suggests that sorting on "course_id" was done and this is stored in the cache. I set up a copy-field, one for grouping (course_id_grouping) and one for all other uses (course_id). I got the message again, now for course_id_grouping. Disabling all caches did not help. I put a test case on https://github.com/lischen3229/solrInsaneFieldCacheErrorTest to replicate the issue. Any pointers on how to get the facets displaying the group counts instead of the document counts highly appreciated. Best, Elisabeth