You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by gu...@apache.org on 2025/05/09 16:51:36 UTC

(lucene) branch main updated: Impl intoBitset and docIdRunEnd for wrappers (#14618)

This is an automated email from the ASF dual-hosted git repository.

guofeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new cebfb0f415b Impl intoBitset and docIdRunEnd for wrappers (#14618)
cebfb0f415b is described below

commit cebfb0f415b48f73ad2e7f49329aa3e05f7993e3
Author: Guo Feng <52...@users.noreply.github.com>
AuthorDate: Sat May 10 00:51:31 2025 +0800

    Impl intoBitset and docIdRunEnd for wrappers (#14618)
---
 lucene/CHANGES.txt                                            |  2 ++
 .../apache/lucene/index/SingletonSortedNumericDocValues.java  | 11 +++++++++++
 .../org/apache/lucene/index/SingletonSortedSetDocValues.java  | 11 +++++++++++
 3 files changed, 24 insertions(+)

diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 22d8551bada..321cfc4d202 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -104,6 +104,8 @@ Optimizations
 
 * GITHUB#14447: Compute the doc range more efficiently when flushing doc block. (Pan Guixin)
 
+* GITHUB#14529, GITHUB#14555, GITHUB#14618: Impl intoBitset for IndexedDISI and Docvalues. (Guo Feng)
+
 Bug Fixes
 ---------------------
 (No changes)
diff --git a/lucene/core/src/java/org/apache/lucene/index/SingletonSortedNumericDocValues.java b/lucene/core/src/java/org/apache/lucene/index/SingletonSortedNumericDocValues.java
index a1dabc69eeb..10783561819 100644
--- a/lucene/core/src/java/org/apache/lucene/index/SingletonSortedNumericDocValues.java
+++ b/lucene/core/src/java/org/apache/lucene/index/SingletonSortedNumericDocValues.java
@@ -17,6 +17,7 @@
 package org.apache.lucene.index;
 
 import java.io.IOException;
+import org.apache.lucene.util.FixedBitSet;
 
 /**
  * Exposes multi-valued view over a single-valued instance.
@@ -62,6 +63,16 @@ final class SingletonSortedNumericDocValues extends SortedNumericDocValues {
     return in.advanceExact(target);
   }
 
+  @Override
+  public void intoBitSet(int upTo, FixedBitSet bitSet, int offset) throws IOException {
+    in.intoBitSet(upTo, bitSet, offset);
+  }
+
+  @Override
+  public int docIDRunEnd() throws IOException {
+    return in.docIDRunEnd();
+  }
+
   @Override
   public long cost() {
     return in.cost();
diff --git a/lucene/core/src/java/org/apache/lucene/index/SingletonSortedSetDocValues.java b/lucene/core/src/java/org/apache/lucene/index/SingletonSortedSetDocValues.java
index 7e57238e9ab..b72d8a4d0f8 100644
--- a/lucene/core/src/java/org/apache/lucene/index/SingletonSortedSetDocValues.java
+++ b/lucene/core/src/java/org/apache/lucene/index/SingletonSortedSetDocValues.java
@@ -18,6 +18,7 @@ package org.apache.lucene.index;
 
 import java.io.IOException;
 import org.apache.lucene.util.BytesRef;
+import org.apache.lucene.util.FixedBitSet;
 
 /**
  * Exposes multi-valued iterator view over a single-valued iterator.
@@ -87,6 +88,16 @@ final class SingletonSortedSetDocValues extends SortedSetDocValues {
     return false;
   }
 
+  @Override
+  public void intoBitSet(int upTo, FixedBitSet bitSet, int offset) throws IOException {
+    in.intoBitSet(upTo, bitSet, offset);
+  }
+
+  @Override
+  public int docIDRunEnd() throws IOException {
+    return in.docIDRunEnd();
+  }
+
   @Override
   public BytesRef lookupOrd(long ord) throws IOException {
     // cast is ok: single-valued cannot exceed Integer.MAX_VALUE