You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2010/10/11 15:27:33 UTC
[jira] Resolved: (LUCENE-2695) DisjunctionMaxScorer allocates 2
arrays per scored doc
[ https://issues.apache.org/jira/browse/LUCENE-2695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless resolved LUCENE-2695.
----------------------------------------
Resolution: Fixed
> DisjunctionMaxScorer allocates 2 arrays per scored doc
> ------------------------------------------------------
>
> Key: LUCENE-2695
> URL: https://issues.apache.org/jira/browse/LUCENE-2695
> Project: Lucene - Java
> Issue Type: Improvement
> Reporter: Michael McCandless
> Assignee: Michael McCandless
> Fix For: 3.1, 4.0
>
> Attachments: LUCENE-2695.patch
>
>
> It has this:
> {noformat}
> @Override
> public float score() throws IOException {
> int doc = subScorers[0].docID();
> float[] sum = { subScorers[0].score() }, max = { sum[0] };
> int size = numScorers;
> scoreAll(1, size, doc, sum, max);
> scoreAll(2, size, doc, sum, max);
> return max[0] + (sum[0] - max[0]) * tieBreakerMultiplier;
> }
> {noformat}
> They are thread-private arrays so possibly/likely JVM can optimize this case (allocate only on the stack) but still I think instead it should have private instance vars for the score/max.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org