lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] Commented: (LUCENE-1593) Optimizations to TopScoreDocCollector and TopFieldCollector
Date Sat, 25 Apr 2009 13:27:30 GMT


Shai Erera commented on LUCENE-1593:

I'm ready to attach the patch, still need to run some perf measurements with it, but that's
orthogonal. I ran "ant clean test" and all tests passed, except for TestSort in tag. The reason
is because the test is invalid (asserts that a bug exists), and so we'll need to change TestSort
in tag in order for it to pass, when this issue is committed (and the bug in MultiSearcher
is fixed).

How should I do it? Just attach a separate patch for tag? This also warrants a change in common-build.xml,
to upgrade to the new tag, which I don't know how it will be named yet. Which brings me back
to a question I asked recently on LUCENE-1529 - why can't we test the branch by default in
test-tag, which means the latest tag? We already today test against the latest tag, only we
need to define it explicitly, which leaves room for errors in case we forget to tag it, or
change common-build.xml accordingly. Instead, we can allow one to specify a tag name (as -D
option) and if specified, we test against that tag name, or otherwise we test against the
branch. Wouldn't that:
* Still allow people to test trunk against a specific tag?
* Be more robust in terms that trunk's test-tag always executes against the latest branch,
and we won't be required to modify common-build.xml every time we change the tag?

Perhaps the latter can even let us to change 2.4's branch a couple of times during a release,
but create a single tag that's compliant with that release in its end? E.g., we've already
created 1 tag because of changes to the trunk (future 2.9) and now we'll need another change.
But from what I understand, When 2.9 comes out, we only need one 2.4 tag which matches the
changes done against 2.9?

Anyway, that's a side discussion. For this issue, we need to update TestSort in 2.4 branch
regardless. Whatever we decide about branch/tag policy will only affect whether I'll need
to update common-build.xml before/after the tag is created.

> Optimizations to TopScoreDocCollector and TopFieldCollector
> -----------------------------------------------------------
>                 Key: LUCENE-1593
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Shai Erera
>             Fix For: 2.9
> This is a spin-off of LUCENE-1575 and proposes to optimize TSDC and TFC code to remove
unnecessary checks. The plan is:
> # Ensure that IndexSearcher returns segements in increasing doc Id order, instead of
> # Change TSDC and TFC's code to not use the doc id as a tie breaker. New docs will always
have larger ids and therefore cannot compete.
> # Pre-populate HitQueue with sentinel values in TSDC (score = Float.NEG_INF) and remove
the check if reusableSD == null.
> # Also move to use "changing top" and then call adjustTop(), in case we update the queue.
> # some methods in Sort explicitly add SortField.FIELD_DOC as a "tie breaker" for the
last SortField. But, doing so should not be necessary (since we already break ties by docID),
and is in fact less efficient (once the above optimization is in).
> # Investigate PQ - can we deprecate insert() and have only insertWithOverflow()? Add
a addDummyObjects method which will populate the queue without "arranging" it, just store
the objects in the array (this can be used to pre-populate sentinel values)?
> I will post a patch as well as some perf measurements as soon as I have them.

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:
For additional commands, e-mail:

View raw message