I have indexed very large documents, In some cases these documents has 100.000 characters. Is there a way to return a portion of the documents (lets say the 300 first characters) when i am querying “Solr”?. Is there any attribute to set in the schema.xml or solrconfig.xml to achieve this?
I have tried many things but nothing worked.
Thank you in advance,
Tom
If you want a preview, you need to use a
copyFieldand specifymaxChars:Then display
previewFieldinstead ofsearchedFieldin your results.I’m assuming you do not want normal search highlighting. If you do, just use the built-in highlighting parameters with
hl.fragsizeas outlined in this answer.