ElasticSearch 5.5.0 Highlight Using JavaAPI

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

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