lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luis Neves <>
Subject r1201855 broke stats.facet on long fields
Date Thu, 08 Dec 2011 22:03:07 GMT


I've a "long" field defined in my schema:

<fieldType name="long" class="solr.TrieLongField" precisionStep="0" 
omitNorms="true" positionIncrementGap="0" />

<field name="ts" type="long" indexed="true" stored="true" required="true" />

Before r1201855 I could use "stats.facet=ts" which allowed me to have a 
timeseries of sorts, now I get an error:

"Stats can only facet on single-valued fields, not: 

positionIncrementGap=0, omitNorms=true}}]"

Is there any hope of having the old behavior back?

Looking at the changed code I see this:

if (facetFieldType.isTokenized() || facetFieldType.isMultiValued()) {
         throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
          "Stats can only facet on single-valued fields, not: " + facetField
           + "[" + facetFieldType + "]");

this seem to also "fix" SOLR-1782.

Luis Neves

View raw message