Package org.apache.lucene.util.hnsw
Record Class IncrementalHnswGraphMerger.GraphReader
java.lang.Object
java.lang.Record
org.apache.lucene.util.hnsw.IncrementalHnswGraphMerger.GraphReader
- Record Components:
reader- the vectors reader that provides the graphinitDocMap- maps the reader's doc IDs to doc IDs in the merged segmentgraphSize- total number of nodes in the graph, including deleted onesliveVectorCount- number of nodes in the graph whose documents are live
- Enclosing class:
IncrementalHnswGraphMerger
protected static record IncrementalHnswGraphMerger.GraphReader(KnnVectorsReader reader, MergeState.DocMap initDocMap, int graphSize, int liveVectorCount)
extends Record
Represents a vector reader that contains graph info.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGraphReader(KnnVectorsReader reader, MergeState.DocMap initDocMap, int graphSize, int liveVectorCount) Creates an instance of aGraphReaderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thegraphSizerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinitDocMaprecord component.intReturns the value of theliveVectorCountrecord component.reader()Returns the value of thereaderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GraphReader
protected GraphReader(KnnVectorsReader reader, MergeState.DocMap initDocMap, int graphSize, int liveVectorCount) Creates an instance of aGraphReaderrecord class.- Parameters:
reader- the value for thereaderrecord componentinitDocMap- the value for theinitDocMaprecord componentgraphSize- the value for thegraphSizerecord componentliveVectorCount- the value for theliveVectorCountrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
reader
Returns the value of thereaderrecord component.- Returns:
- the value of the
readerrecord component
-
initDocMap
Returns the value of theinitDocMaprecord component.- Returns:
- the value of the
initDocMaprecord component
-
graphSize
public int graphSize()Returns the value of thegraphSizerecord component.- Returns:
- the value of the
graphSizerecord component
-
liveVectorCount
public int liveVectorCount()Returns the value of theliveVectorCountrecord component.- Returns:
- the value of the
liveVectorCountrecord component
-