You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Michael Sokolov (Jira)" <ji...@apache.org> on 2019/12/17 21:34:00 UTC
[jira] [Resolved] (LUCENE-7566) BooleanQuery.Builder shouldn't
clone added clauses
[ https://issues.apache.org/jira/browse/LUCENE-7566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Sokolov resolved LUCENE-7566.
-------------------------------------
Resolution: Fixed
This seems to have been fixed at some point, just resolving the issue after the fact. I now see:
{{public Builder add(BooleanClause clause) {}}
{{ // We do the final deep check for max clauses count limit during}}
{{ //<code>IndexSearcher.rewrite</code> but do this check to short}}
{{ // circuit in case a single query holds more than numClauses}}
{{ if (clauses.size() >= IndexSearcher.maxClauseCount) {}}
{{ throw new IndexSearcher.TooManyClauses();}}
{{ }}}
{{ clauses.add(clause);}}
{{ return this;}}
{{ }}}
> BooleanQuery.Builder shouldn't clone added clauses
> --------------------------------------------------
>
> Key: LUCENE-7566
> URL: https://issues.apache.org/jira/browse/LUCENE-7566
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Yonik Seeley
> Priority: Trivial
>
> Minor GC improvement: There's no reason to clone BooleanClause in BooleanQuery.Builder.add()
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org