Search code examples
solrsolrcloud

Solr string field maximum length


My solr has a definition for an this field type:

managed-schema.xml

 ...
 <dynamicField name="*_ss" type="lowercases" indexed="true" stored="true"/>
 ...

Whenever I try to index a document with this field's value too large i get an exception.

I can't seem to find what is the size limit for this kind of field. The only thing I can find is the property "maxFieldLength" which is said to be removed in Solr 4.0.

Any way of telling what is the limit?


Solution

  • Yes you are correct "maxFieldLength" which is removed in Solr 4.0.

    To get similar behavior, include a LimitTokenCountFilterFactory in your fieldType definition.

    <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>