nit0906 commented on code in PR #1193:
URL: https://github.com/apache/jackrabbit-oak/pull/1193#discussion_r1388129243
##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticDocument.java:
##########
@@ -67,24 +70,40 @@ void addFulltextRelative(String path, String value) {
}
void addSuggest(String value) {
- suggest.add(value);
+ suggest.add(Map.of("value", value));
Review Comment:
Earlier suggest was a set of String where multiple unique values could have
been added. Now it's set of map where entry (a map) gets initialized every
time addSuggest is called. Is that expected ?
Does ES expects multiple map instances here each containing a single entry
with key as "value" ? If that's the case , maybe we can add a comment here to
explain this and maybe move the hardcoded "value" to a final String variable ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]