But the methods "addHighlightedField", "setHighlighterPreTags" and "setHighlighterPostTags" are deprecated.
Anyone knows or any references on how to implement the highlighting in version 5?
all the highlighter related setters were moved to the HighlightBuilder. You can create a new HighlightBuilder, use on of the various field() methods on it and use preTags() or postTags() to change the tags. Then you add that highlighter to the SearchRequestBuilder using the highlighter(highlightBuilder) method.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.