dweiss commented on code in PR #11990: URL: https://github.com/apache/lucene/pull/11990#discussion_r1036450814
########## lucene/highlighter/src/java/org/apache/lucene/search/matchhighlight/PassageSelector.java: ########## @@ -89,8 +89,9 @@ public List<Passage> pickBest( } // Best passages so far. + int pqSize = Math.max(markers.size(), maxPassages); Review Comment: This can make the priority queue huge in degenerate cases when there is a lot of markers. And there may be for queries that expand to hundreds of terms (prefix queries are an example of this). I wonder if this shouldn't be a function of maxPassages rather than the number of markers... -- 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