apache / apache/lucene

Maybe a DocIdSetIterator may implement Bits? [LUCENE-8386]

Open
#9,433 4 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Minor module:core/search type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

I was looking at ConjunctionDISI and noted the special case logic for DISI's of type BitSetIterator. It seems to only need the more minimal Bits interface though it makes references to BitSet specifically. BitSetIterator is a concrete class; it would be nice if a DISI could either implement an optional interface to expose a Bits or perhaps implements Bits directly. This would allow other/custom DISIs that can implement a Bits quickly without being forced to use BitSetIterator specifically. Even DocIdSetIterator.all(...) could implement this.

---
Migrated from [LUCENE-8386](https://issues.apache.org/jira/browse/LUCENE-8386) by David Smiley (@dsmiley), updated Jul 09 2018

Contributor guide

Open the contributing guide

Research direction

Start by reading ConjunctionDISI and the special-case handling for BitSetIterator, then inspect the Bits interface, BitSetIterator, and DocIdSetIterator.all(...). Compare the proposed optional Bits exposure or direct implementation and determine the compatible API shape. Done means custom DocIdSetIterator implementations can provide Bits without being tied to BitSetIterator, with relevant behavior covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.