Skip to content

Commit

Permalink
Removing unused interface
Browse files Browse the repository at this point in the history
  • Loading branch information
benwtrent committed Apr 11, 2024
1 parent 8df6fb7 commit dce5737
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 25 deletions.
3 changes: 3 additions & 0 deletions lucene/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ New Features
* GITHUB#13197: Expand support for new scalar bit levels for HNSW vectors. This includes 4-bit vectors and an option
to compress them to gain a 50% reduction in memory usage. (Ben Trent)

* GITHUB#13288: Make HNSW and Flat storage vector formats easier to extend with new FlatVectorScorer interface. Add
new Hnsw format for binary quantized vectors. (Ben Trent)

Improvements
---------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ public byte[] vectorValue(int targetOrd) throws IOException {
return binaryValue;
}

@Override
public IndexInput getSlice() {
return slice;
}

private void readValue(int targetOrd) throws IOException {
slice.seek((long) targetOrd * byteSize);
slice.readBytes(byteBuffer.array(), byteBuffer.arrayOffset(), byteSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ public float[] vectorValue(int targetOrd) throws IOException {
return value;
}

@Override
public IndexInput getSlice() {
return slice;
}

public static OffHeapFloatVectorValues load(
OrdToDocDISIReaderConfiguration configuration,
VectorEncoding vectorEncoding,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,6 @@ public byte[] vectorValue(int targetOrd) throws IOException {
return binaryValue;
}

@Override
public IndexInput getSlice() {
return slice;
}

@Override
public float getScoreCorrectionConstant() {
return scoreCorrectionConstant[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import java.io.IOException;
import java.util.List;
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.util.Bits;

/**
Expand Down Expand Up @@ -62,15 +61,6 @@ default Bits getAcceptOrds(Bits acceptDocs) {
return acceptDocs;
}

/**
* Returns the {@link IndexInput} slice that contains the vector values. Since the vectors are
* stored in a flat file, their offsets are calculable given dimensions and codec configurations.
* By default, this returns null as some implementations may not reference a slice.
*/
default IndexInput getSlice() {
return null;
}

/** Float vector values. */
interface Floats extends RandomAccessVectorValues {
@Override
Expand Down

0 comments on commit dce5737

Please sign in to comment.