Re: group.facet fails when facet on double field

2016-10-28 Thread karel braeckman
Thanks for your reply. I don't think this is what is causing the error
though.

We are starting from an empty index and have fully re-indexed a couple of
documents. The query is still failing with the same error.



On Sun, Oct 23, 2016 at 4:51 PM, Pushkar Raste 
wrote:

>  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.braeck...@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:
> >
> >
> >  > precisionStep="0" positionIncrementGap="0"/> > type="double" indexed="true" stored="true" multiValued="false"
> > /> > multiValued="false" />
> >
> > Am I doing anything wrong, or do you have any suggestions on what to try
> > next?
> >
> >
> > Best regards
> >
> > Karel Braeckman
> >
>


group.facet fails when facet on double field

2016-10-20 Thread karel braeckman
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:




Am I doing anything wrong, or do you have any suggestions on what to try next?


Best regards

Karel Braeckman