apache / apache/lucene

Add a default implementation for DISI.nextDoc() [LUCENE-6029]

Open
#7,091 2 comments 0 reactions 0 assignees View on GitHub
legacy-jira-fix-version:5.0 legacy-jira-priority:Minor type:task
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

In some cases, nextDoc() cannot really be faster than advance(docID() + 1), so we could make it the default implementation?

This is already how BitDocIdSet, NotDocIdSet, SloppyPhraseScorer and DocValuesDocIdSet implement nextDoc().

https://issues.apache.org/jira/browse/LUCENE-6022?focusedCommentId=14181542&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14181542

---
Migrated from [LUCENE-6029](https://issues.apache.org/jira/browse/LUCENE-6029) by Adrien Grand (@jpountz)
Attachments: [LUCENE-6029.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-6029/LUCENE-6029.patch)

Contributor guide

Open the contributing guide

Research direction

Start with DISI.nextDoc() and compare the implementations named in the issue: BitDocIdSet, NotDocIdSet, SloppyPhraseScorer, and DocValuesDocIdSet. Read the linked LUCENE-6022 discussion and attached LUCENE-6029.patch for context; done means the common behavior is provided by the default implementation without requiring those duplicate implementations.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.