ElasticSearch 5.5.0 Highlight Using JavaAPI


(Nitin) #1

Hi Experts,
I have been trying to highlight some of my matched strings using this:
HighlightBuilder highlightBuilder = new HighlightBuilder()
.postTags("")
.preTags("").field("_all");
SearchRequestBuilder searchQuery = client.prepareSearch().setQuery(QueryBuilders.matchQuery("_all", text)).highlighter(highlightBuilder);

But this is not working. Can someone let me know what I am doing wrong?

Thanks


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.