iverase opened a new pull request #692: URL: https://github.com/apache/lucene/pull/692
The idea in this PR is the following: 1) Extract the sparse structure to collect docIds from docIdSetBuilder in a class called Buffers so it can be used by the different implementations. 2) Add a new DocIdSetBuilder implementation for points called `PointsDocIdSetBuilder` with the following API: ``` /** * Utility class to efficiently add many docs in one go. * * @see PointsDocIdSetBuilder#grow */ public abstract static class BulkAdder { public abstract void add(int doc); public void add(DocIdSetIterator iterator) throws IOException { int docID; while ((docID = iterator.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) { add(docID); } } } /** * Reserve space and return a {@link BulkAdder} object that can be used to visit up to {@code * numPoints} points. */ public BulkAdder grow(long numPoints); ``` 3) DocIdSet builder API looks like that after the extraction of the points API: ``` /** * Add the content of the provided {@link DocIdSetIterator} to this builder. NOTE: if you need to * build a {@link DocIdSet} out of a single {@link DocIdSetIterator}, you should rather use {@link * RoaringDocIdSet.Builder}. */ public void add(DocIdSetIterator iter) throws IOException; /** Add a single document to this builder. */ public void add(int doc); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org