lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pushkar Raste <pushkar.ra...@gmail.com>
Subject Re: group.facet fails when facet on double field
Date Sun, 23 Oct 2016 14:51:58 GMT
 This error is thrown when you add (or remove) on an existing field but do
not reindex you data from scratch. It is result of removing field cache
from Lucene. Although you were not getting error with Solr 4.8, I am pretty
sure that you were getting incorrect results.

Stand up a small test cluster with Solr 6.2.X and index a few documents in
it and  try your group.facet query, it would definitely work.

On Thu, Oct 20, 2016 at 9:18 AM, karel braeckman <karel.braeckman@gmail.com>
wrote:

> Hi,
>
> We are trying to upgrade from Solr 4.8 to Solr 6.2.
>
> This query:
>
> ?q=*%3A*&start=0&rows=2&wt=json&indent=true&group=true&
> group.field=mediaObjectId&facet=true&facet.field=rating&group.facet=true
>
> is returning the following error:
>
> null:org.apache.solr.common.SolrException: Exception during facet.field:
> rating
>         at org.apache.solr.request.SimpleFacets.lambda$
> getFacetFieldCounts$0(SimpleFacets.java:739)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at org.apache.solr.request.SimpleFacets$2.execute(
> SimpleFacets.java:672)
>         ...
> Caused by: java.lang.IllegalStateException: unexpected docvalues type
> NUMERIC for field 'mediaObjectId' (expected=SORTED). Re-index with
> correct docvalues type.
>         at org.apache.lucene.index.DocValues.checkField(
> DocValues.java:212)
>         at org.apache.lucene.index.DocValues.getSorted(DocValues.java:264)
>         at org.apache.lucene.search.grouping.term.
> TermGroupFacetCollector$SV.doSetNextReader(TermGroupFacetCollector.java:
> 128)
>         ...
>
>
> The same query without the group.facet=true option does not give an
> error. On Solr 4.8 the query did not give problems.
>
>
> The relevant fields are configured as follows:
>
>
> <fieldType name="double" class="solr.TrieDoubleField"
> precisionStep="0" positionIncrementGap="0"/><field name="rating"
> type="double" indexed="true" stored="true" multiValued="false"
> /><field name="mediaObjectId" type="long" indexed="true" stored="true"
> multiValued="false" />
>
> Am I doing anything wrong, or do you have any suggestions on what to try
> next?
>
>
> Best regards
>
> Karel Braeckman
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message