[ https://issues.apache.org/jira/browse/LUCENE-7365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15356611#comment-15356611 ]
Adrien Grand commented on LUCENE-7365: -------------------------------------- One concern I have is that this reduces test coverage of BS1. Since this is mostly an issue for MemoryIndex (the cost of searching small segments is usually negligible compared to larger segments), maybe we could use another approach and modify {{MemoryIndex.createSearcher}} to return an IndexSearcher which overrides the {{protected void search(List<LeafReaderContext> leaves, Weight weight, Collector collector)}} method in order to use the Scorer API rather than the BulkScorer API? > Don't use BooleanScorer for small segments > ------------------------------------------ > > Key: LUCENE-7365 > URL: https://issues.apache.org/jira/browse/LUCENE-7365 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Alan Woodward > Assignee: Alan Woodward > Attachments: LUCENE-7365.patch > > > If a BooleanQuery meets certain criteria (only contains disjunctions, is > likely to match large numbers of docs) then we use a BooleanScorer to score > groups of 1024 docs at a time. This allocates arrays of 1024 Bucket objects > up-front. On very small segments (for example, a MemoryIndex) this is very > wasteful of memory, particularly if the query is large or deeply-nested. We > should avoid using a bulk scorer on these segments. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org