>From the stats component page:

"The stats component returns simple statistics for indexed numeric
fields within the DocSet"

So string, text, anything non-numeric won't work. You can declare it
multiValued but then
you have to add multiple values for the field when you send the doc to
Solr or implement
a custom update component to break them up. At least there's no filter
that I know of that
takes a delimited set of numbers and transforms them.

FWIW,
Erick

On Wed, Jun 26, 2013 at 4:14 AM, Elran Dvir <elr...@checkpoint.com> wrote:
> Hi all,
>
> StatsComponent doesn't work if field's type is TextField.
> I get the following message:
> "Field type 
> textstring{class=org.apache.solr.schema.TextField,analyzer=org.apache.solr.analysis.TokenizerChain,args={positionIncrementGap=100,
> sortMissingLast=true}} is not currently supported".
>
> My field configuration is:
>
> <fieldType name="mvstring" class="solr.TextField" positionIncrementGap= "100" 
> sortMissingLast="true">
>             <analyzer type="index">
>                 <tokenizer class="solr.PatternTokenizerFactory" pattern="\n" 
> />
>             </analyzer>
> </fieldType>
>
> <field name="myField" type="mvstring" indexed="true" stored="false" 
> multiValued="true"/>
>
> So, the reason my field is of type TextField is that in the document indexed 
> there may be multiple values in the field separated by new lines.
> The tokenizer is splitting it to multiple values and the field is indexed as 
> multi-valued field.
>
> Is there a way I can define the field as regular String field? Or a way to 
> make StatsComponent work with TextField?
>
> Thank you very much.

Reply via email to