Did you look into UpdateRequestProcessors? There is a truncate one there.
Regards, Alex On Sun, Jul 8, 2018, 12:44 AM Zahra Aminolroaya, <z.aminolro...@gmail.com> wrote: > I want to truncate my string field type due to its number of bytes limit. I > wrote the following in my schema: > > > <fieldType name="string" class="solr.StrField" sortMissingLast="true"/> > <analyzer type="index"> > <tokenizer class="solr.KeywordTokenizerFactory"/> > <filter class="solr.TruncateTokenFilterFactory" > prefixLength="32700"/> > </analyzer> > <analyzer type="query"> > <tokenizer class="solr.KeywordTokenizerFactory"/> > <filter class="solr.TruncateTokenFilterFactory" > prefixLength="32700"/> > </analyzer> > </fieldType> > > However, I found that StrField (string) does not support specifying an > analyzer. Besides, prefixLength in TruncateTokenFilterFactory could not be > more than 1000. > > I want to have the same application of string. Do you think it is > reasonable > to use "text_general" field type with solr.KeywordTokenizerFactory filter > to have the same application? Do I lose any feature? > > If I use text_general, it is not needed to truncate. > > > > > > -- > Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html >