Module org.apache.lucene.core
Class Lucene99FlatVectorsWriter.FlatCloseableRandomVectorScorerSupplier
- java.lang.Object
-
- org.apache.lucene.codecs.lucene99.Lucene99FlatVectorsWriter.FlatCloseableRandomVectorScorerSupplier
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,CloseableRandomVectorScorerSupplier
,RandomVectorScorerSupplier
- Enclosing class:
- Lucene99FlatVectorsWriter
static final class Lucene99FlatVectorsWriter.FlatCloseableRandomVectorScorerSupplier extends java.lang.Object implements CloseableRandomVectorScorerSupplier
-
-
Field Summary
Fields Modifier and Type Field Description private int
numVectors
private java.io.Closeable
onClose
private RandomVectorScorerSupplier
supplier
-
Constructor Summary
Constructors Constructor Description FlatCloseableRandomVectorScorerSupplier(java.io.Closeable onClose, int numVectors, RandomVectorScorerSupplier supplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
RandomVectorScorerSupplier
copy()
Make a copy of the supplier, which will copy the underlying vectorValues so the copy is safe to be used in other threads.RandomVectorScorer
scorer(int ord)
This creates aRandomVectorScorer
for scoring random nodes in batches against the given ordinal.int
totalVectorCount()
-
-
-
Field Detail
-
supplier
private final RandomVectorScorerSupplier supplier
-
onClose
private final java.io.Closeable onClose
-
numVectors
private final int numVectors
-
-
Constructor Detail
-
FlatCloseableRandomVectorScorerSupplier
FlatCloseableRandomVectorScorerSupplier(java.io.Closeable onClose, int numVectors, RandomVectorScorerSupplier supplier)
-
-
Method Detail
-
scorer
public RandomVectorScorer scorer(int ord) throws java.io.IOException
Description copied from interface:RandomVectorScorerSupplier
This creates aRandomVectorScorer
for scoring random nodes in batches against the given ordinal.- Specified by:
scorer
in interfaceRandomVectorScorerSupplier
- Parameters:
ord
- the ordinal of the node to compare- Returns:
- a new
RandomVectorScorer
- Throws:
java.io.IOException
-
copy
public RandomVectorScorerSupplier copy() throws java.io.IOException
Description copied from interface:RandomVectorScorerSupplier
Make a copy of the supplier, which will copy the underlying vectorValues so the copy is safe to be used in other threads.- Specified by:
copy
in interfaceRandomVectorScorerSupplier
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
totalVectorCount
public int totalVectorCount()
- Specified by:
totalVectorCount
in interfaceCloseableRandomVectorScorerSupplier
-
-