Hi All, We are using solr 9.6.1 with a collection consisting of 59 shards [one document might be present on more than one shard]. We are trying to apply grouping based on suppliers and then apply facet based on one document of each supplier [although we are fetching more than one].
To achieve this we are using multiple params ilke facet and groups.facet which is resulting in an error. The parameters used in query are [excluded basic params like qt and fq]: "group.field": "usr_id", "group": "true", "group.ngroups": "true", "group.facet": "true" "facet.field": [ "city", "CustTypeWt", "datatype" ] "facet.limit": "15", "facet.mincount": "1", "facet": "true" We are facing an issue while using *group.facet=true* in solr queries. Error returned is: java.lang.IllegalStateException: unexpected docvalues type NUMERIC for field 'CustTypeWt' (expected=SORTED). Re-index with correct docvalues type. at org.apache.lucene.index.DocValues.checkField(DocValues.java:218) ~[?:?] at org.apache.lucene.index.DocValues.getSorted(DocValues.java:276) ~[?:?] at org.apache.lucene.search.grouping.TermGroupFacetCollector$SV.doSetNextReader(TermGroupFacetCollector.java:145) ~[?:?] at org.apache.lucene.search.SimpleCollector.getLeafCollector(SimpleCollector.java:31) ~[?:?] at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:729) ~[?:?] at org.apache.solr.search.SolrIndexSearcher$4.searchWithTimeout(SolrIndexSearcher.java:729) ~[?:?] at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:735) ~[?:?] at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:552) ~[?:?] at org.apache.solr.request.SimpleFacets.getGroupedCounts(SimpleFacets.java:807) ~[?:?] at org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:509) ~[?:?] at org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:429) ~[?:?] at org.apache.solr.request.SimpleFacets.lambda$getFacetFieldCounts$0(SimpleFacets.java:915) ~[?:?] ... 63 more The issue is not coming if removing the groups.facet parameter. Any help with reason/ resolution for this issue will be highly appreciated.