Is there a way to get a text summary of an indexed document with CLucene (a.k.a. a “snippet” or “fragment”) to display along with the search result?
You need to store the documents’ summary in the index (use ”Field Store” when creating that field) and then use the Highlighter from the contrib package. It’s important to use a rewritten query as the input for the highlighter, i.e. call rewrite() on the query. Otherwise simple queries will work but prefix queries etc will not be highlighted.
Related Questions
- Is there a way to get a text summary of an indexed document with CLucene (a.k.a. a "snippet" or "fragment") to display along with the search result?
- Is there a way to get a text summary of an indexed document with Lucene (a.k.a. a "snippet" or "fragment") to display along with the search result?
- How can I customize screens to change the display in Account Summary & Draft Summary?