You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Priya Rodrigues <ro...@gmail.com> on 2017/12/04 09:03:47 UTC

Solr 7.1.0 Group Facets Error

Facing errors on using groups and facets

These queries work fine -
http://localhost:8983/solr/urls/select?q=*:*&rows=0&facet=true&facet.field=city_id
http://localhost:8983/solr/urls/select?q=*:*&rows=0&facet=true&facet.field=city_id&group=true&group.field=locality_id

These kind of queries (where group.facet=true) is set throws errors
http://localhost:8983/solr/urls/select?q=*:*&rows=0&facet=true&facet.field=city_id&group=true&group.field=locality_id&group.facet=true

java.lang.IllegalStateException: unexpected docvalues type NUMERIC for
field 'locality_id' (expected=SORTED). Re-index with correct docvalues
type.\n\tat org.apache.lucene.index.DocValues.checkField(DocValues.java:340)\n\tat
org.apache.lucene.index.DocValues.getSorted(DocValues.java:392)\n\tat
org.apache.lucene.search.grouping.TermGroupFacetCollector$SV.doSetNextReader(TermGroupFacetCollector.java:146)\n\tat
org.apache.lucene.search.SimpleCollector.getLeafCollector(SimpleCollector.java:33)\n\tat
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:649)\n\tat
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:462)\n\tat
org.apache.solr.request.SimpleFacets.getGroupedCounts(SimpleFacets.java:705)\n\tat
org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:480)\n\tat
org.apache.solr.request.SimpleFacets.getTermCounts(SimpleFacets.java:409)\n\tat
org.apache.solr.request.SimpleFacets.lambda$getFacetFieldCounts$0(SimpleFacets.java:816)\n\t...
39 more\n",

Schema.xml

<field name="city_id" type="pint" indexed="true" stored="true"/>
<field name="locality_id"  type="pint" indexed="true" stored="true"/>

<fieldType name="pint" class="solr.IntPointField" docValues="true"/>

Help appreciated!

Priya