lucene-solr-user mailing list archives

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


Hello,

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: 
ts[long{class=org.apache.solr.schema.TrieLongField,analyzer=org.apache.solr.analysis.TokenizerChain,args={precisionStep=0,

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


Mime
View raw message