apache / apache/lucene

Better propagate two-phase iterators in conjunctions [LUCENE-7332]

Open
#8,386 0 comments 0 reactions 1 assignee Claimed by @jpountz View on GitHub
legacy-jira-priority:Minor type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

I suspect it is very common to have a single two-phase iterator to check in a query tree. Yet, even in that case, the way the API works currently forces ConjunctionDISI to wrap it anyway in order to propagate it to the higher level. I'd like to explore changing the API so that the top-level scorer would directly call the two-phase iterator instead of going through multiple wrappers.

Then we might be able to add the same RandomAccessStratogy optimization as FilteredQuery had in case a two-phase iterator supports random-access and is expected to match many documents.

---
Migrated from [LUCENE-7332](https://issues.apache.org/jira/browse/LUCENE-7332) by Adrien Grand (@jpountz), 1 vote

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.