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/03/13 05:32:41 UTC

[GitHub] [lucene] zacharymorn commented on a change in pull request #16: LUCENE-9634: Fix highlighting of extended intervals matched using offset

zacharymorn commented on a change in pull request #16:
URL: https://github.com/apache/lucene/pull/16#discussion_r593615132



##########
File path: lucene/core/src/java/org/apache/lucene/search/DisjunctionMatchesIterator.java
##########
@@ -250,6 +250,10 @@ public MatchesIterator getSubMatches() throws IOException {
 
   @Override
   public Query getQuery() {
-    return queue.top().getQuery();
+    if (queue.size() > 0) {

Review comment:
       This change is needed to fix two other tests that would throw NPE from here when `matchesIterator.getQuery()` is called in `OffsetsFromMatchIterator`




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