Do you need to store the entire field or just the first part for highlighting? If the latter, then define the field you search as
indexed="true" stored="false" and the field you want to highlight (truncated) as indexed="false" stored="true". True that defines one extra field but the cost of one extra field is probably too small to measure. And you're not including any redundant data in your index. Best, Erick On Sun, Jun 26, 2016 at 6:52 AM, asteiner <astei...@varonis.com> wrote: > Thanks Alex, > > This processor truncates the fields during index (I just checked it), but I > need a different thing. > Let's say I have a content of 100 characters. I want whole of this field to > be indexed, but I want to store only the first 50 characters, which I will > use for highlighting. > i.e: content="Hello world, have a nice day" . I want to index all these > terms, but store only "Hello world", so if I will search for "world" I will > get the document with highlighted term and when I will search for "nice" I > will still get the document but without highlighting. My problem is that the > stored fields takes too much disk space and I want to reduce it. > Is there a way to truncate or limit field length only for storing? > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/limit-stored-field-size-tp4284356p4284362.html > Sent from the Solr - User mailing list archive at Nabble.com.