jimczi commented on a change in pull request #444:
URL: https://github.com/apache/lucene/pull/444#discussion_r749986210



##########
File path: 
lucene/sandbox/src/java/org/apache/lucene/sandbox/search/MultiNormsLeafSimScorer.java
##########
@@ -61,7 +63,14 @@
     if (needsScores) {
       final List<NumericDocValues> normsList = new ArrayList<>();
       final List<Float> weightList = new ArrayList<>();
+      final Set<String> duplicateCheckingSet = new HashSet<>();
       for (FieldAndWeight field : normFields) {
+        assert duplicateCheckingSet.contains(field.field) == false
+            : "There is duplicated field ["
+                + field.field
+                + "] used to construct MultiNormsLeafSimScorer";
+        duplicateCheckingSet.add(field.field);

Review comment:
       Could be `assert duplicateCheckingSet.add(field.field) == false` ? 




-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to