Hi

I have a field called content which I'm indexing and use for highlighting,
which means it has to be stored as well. 

<field name="content" type="text_general" indexed="true" stored="true"
multiValued="false" termVectors="true"/>


But this field may be too big, so I want to limit the stored size to X
characters (it is fine to highlight only the first X characters).

One solution is to create another field called content_snippet which will be
a copy field of content field by maxchars of X (10000 in my example), set
content as non-stored and set content_snippet as stored and indexed.
content_snippet must be indexed in order to highlight it. 

<field name="content" type="text_general" indexed="true" stored="false"
multiValued="false" termVectors="true"/>
<field name="content_snippet" omitNorms="true" type="text_general"
indexed="true" stored="true" multiValued="false"/>
<copyField source="content" dest="content_snippet" maxChars="10000" />


So as a result I have two indexed fields, which is redundant. My goal is to
decrease index size. Is there a way to limit the stored size within one
field without creating copy field?




--
View this message in context: 
http://lucene.472066.n3.nabble.com/limit-stored-field-size-tp4284356.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to