You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2016/07/04 06:46:10 UTC
[jira] [Commented] (LUCENE-7365) Don't use BooleanScorer for small
segments
[ https://issues.apache.org/jira/browse/LUCENE-7365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15360917#comment-15360917 ]
Adrien Grand commented on LUCENE-7365:
--------------------------------------
You should do {{return new Weight(innerWeight.getQuery()) {}} rather than {{return new Weight(query) {}} so that the query that is wrapped by the weight is rewritten. Could you also put a comment that the important thing is to not extend bulkScorer. Since all implemented methods of the wrapper delegate to the base impl, it's not obvious what it changes.
I think we should put this specialized searcher in the memory module as it does not really make sense for other use-cases?
> 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-query.patch, LUCENE-7365.patch, LUCENE-7365.patch, 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org