We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The RestHighLevelClient allows for custom options for a highlighted field. In DSL:
"highlight": { "type": "my-custom-highlighter", "highlight_query": {[..]} "order": "score", "fields": { "my-field": { "options": { "foo": "bar" } } } }
In Java with RHLC that can be done with:
final HighlightBuilder.Field highlightField = new HighlightBuilder.Field("my-field") .options(Map.of("foo", "bar"));
However, no such support for custom options exist in new Java client. Any plans to re-introduce that functionality?
Implementation in RHLC can be found in org/elasticsearch/search/fetch/subphase/highlight/AbstractHighlighterBuilder.java:
org/elasticsearch/search/fetch/subphase/highlight/AbstractHighlighterBuilder.java
[..] /** * Allows to set custom options for custom highlighters. */ @SuppressWarnings("unchecked") public HB options(Map<String, Object> options) { this.options = options; return (HB) this; } [..]
The text was updated successfully, but these errors were encountered:
Add support for highlight-field options (elastic#168)
eb64d2f
f25acda
This is part of the larger issue #252 to add support for custom components.
Sorry, something went wrong.
issue 252 has been resolved and merged, here's the documentation on how to implement custom highlighters in the new Java Rest API Client
Successfully merging a pull request may close this issue.
The RestHighLevelClient allows for custom options for a highlighted field. In DSL:
In Java with RHLC that can be done with:
However, no such support for custom options exist in new Java client. Any plans to re-introduce that functionality?
Implementation in RHLC can be found in
org/elasticsearch/search/fetch/subphase/highlight/AbstractHighlighterBuilder.java
:The text was updated successfully, but these errors were encountered: