nit0906 commented on a change in pull request #518:
URL: https://github.com/apache/jackrabbit-oak/pull/518#discussion_r827606943
##########
File path:
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java
##########
@@ -283,8 +283,10 @@ protected boolean indexTypeOrderedFields(Document doc,
String pname, int tag, Pr
}
if (f != null && includePropertyValue(property, 0, pd)) {
- doc.add(f);
- fieldAdded = true;
+ if (doc.getField(f.name()) == null) {
+ doc.add(f);
+ fieldAdded = true;
+ }
Review comment:
Should we add a log in the else part here , which might prompt the
developer to remove the duplicity form the index def ?
##########
File path:
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java
##########
@@ -283,8 +283,10 @@ protected boolean indexTypeOrderedFields(Document doc,
String pname, int tag, Pr
}
if (f != null && includePropertyValue(property, 0, pd)) {
- doc.add(f);
- fieldAdded = true;
+ if (doc.getField(f.name()) == null) {
+ doc.add(f);
+ fieldAdded = true;
+ }
Review comment:
Should we add a log in the else part here , which might prompt the
developer to remove the duplicity form the index def ?
--
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]