fabriziofortino commented on code in PR #1006:
URL: https://github.com/apache/jackrabbit-oak/pull/1006#discussion_r1243631395
##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticDocument.java:
##########
@@ -81,7 +79,7 @@ void addSpellcheck(String value) {
// ref: https://www.elastic.co/blog/strings-are-dead-long-live-strings
// (interpretation of date etc:
https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-field-mapping.html)
void addProperty(String fieldName, Object value) {
- properties.computeIfAbsent(fieldName, s -> new
ArrayList<>()).add(value);
+ properties.computeIfAbsent(fieldName, s -> new
LinkedHashSet<>()).add(value);
Review Comment:
is not essential but it's good to keep the original order. Elastic stores
this data in an ordered list. For each term, the position is stored as well. In
general, searching for two terms that are closer has a higher score than two
terms that are far apart.
--
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]