-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Problem
I want to replace ElasticSearchRestTemplate for ElasticSearchTemplate in order to get rid of deprecated RestHighLevelClient.
There's a use case where a highlight query is needed.
Elasticsearch allows to specify a highlight query as explained in Elasticseach documentation
Version
Spring Data Elasticsearch 4.4.5
Issue
NativeSearchQueryBuilder
allowed using it like this:
new NativeSearchQueryBuilder().withHighlightBuilder(new HighlightBuilder().highlightQuery(_here_comes_the_query_));
But NativeQueryBuilder
does not allow it, as withHighlight
method from BaseQueryBuilder
accepts a Highlight
and a class instead of a HighlightBuilder
Is there something I didn't see or is the possibility to add a highlight query really missing?
Please note Elasticsearch provides a Hightlight.Builder
class that could be used as a replacement for HighlightBuilder