[
https://issues.apache.org/jira/browse/LUCENE-7339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15341306#comment-15341306
]
Uwe Schindler edited comment on LUCENE-7339 at 6/21/16 7:44 AM:
----------------------------------------------------------------
Hi,
yes. I checked the createConjunction code, looks fine to me.
I have just a minor "simplification". Finding the minCost can be done with Java
8 streams very easily:
Instead of:
{code:java}
long minCost = Long.MAX_VALUE;
for (DocIdSetIterator iterator : allIterators) {
minCost = Math.min(minCost, iterator.cost());
}
{code}
Do in a one-liner with method-references and streams:
{code:java}
long minCost =
allIterators.stream().mapToLong(DocIdSetIterator::cost).min().getAsLong();
{code}
Test with the anonymous class looks fine!
was (Author: thetaphi):
Hi,
yes. I checked the createConjunction code, looks fine to me.
I have just a minor "simplification". Finding the minCost can be done with Java
8 streams very easily:
Instead of:
{code:java}
long minCost = Long.MAX_VALUE;
for (DocIdSetIterator iterator : allIterators) {
minCost = Math.min(minCost, iterator.cost());
}
{code}
Do in a one-liner with method-references and streams:
{code:java}
long minCost = allIterators.stream().mapToLong(DocIdSetIterator::cost).min();
{code}
Test with the anonymous class looks fine!
> Bring back RandomAccessFilterStrategy
> -------------------------------------
>
> Key: LUCENE-7339
> URL: https://issues.apache.org/jira/browse/LUCENE-7339
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Adrien Grand
> Assignee: Adrien Grand
> Priority: Minor
> Attachments: LUCENE-7339.patch
>
>
> FiteredQuery had 3 ways of running conjunctions: leap-frog, query first and
> random-access filter. We still use leap-frog for conjunctions and we now have
> a better "query-first" strategy through two-phase iteration. However, we
> don't have any equivalent for the random-access filter strategy.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]