You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/06/15 12:53:05 UTC

[GitHub] [lucene] jpountz commented on a change in pull request #185: LUCENE-9999: CombinedFieldQuery can fail with an exception when document is missing fields

jpountz commented on a change in pull request #185:
URL: https://github.com/apache/lucene/pull/185#discussion_r651759489



##########
File path: lucene/sandbox/src/java/org/apache/lucene/sandbox/search/MultiNormsLeafSimScorer.java
##########
@@ -80,9 +80,7 @@
   }
 
   private long getNormValue(int doc) throws IOException {
-    if (norms != null) {
-      boolean found = norms.advanceExact(doc);
-      assert found;
+    if (norms != null && norms.advanceExact(doc)) {

Review comment:
       I believe that the old logic was correct?
   
   The only case I can think of when it might fail is when some fields are indexed with norms and other fields without norms, but I'm not sure we should even try to support this case with `CombinedFieldQuery`.




-- 
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.

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



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