Package org.apache.lucene.index
Record Class LeafMetaData
java.lang.Object
java.lang.Record
org.apache.lucene.index.LeafMetaData
- Record Components:
createdVersionMajor- the Lucene version that created this index. This can be used to implement backward compatibility on top of the codec API. A return value of6indicates that the created version is unknown.minVersion- the minimum Lucene version that contributed documents to this index, ornullif this information is not available.sort- the order in which documents from this index are sorted, ornullif documents are in no particular order.hasBlocks- Returnstrueiff this index contains blocks created withIndexWriter.addDocument(Iterable)or it's corresponding update methods with at least 2 or more documents per call. Note: This property was not recorded beforeVersion.LUCENE_9_9_0this method will return false for all leaves written beforeVersion.LUCENE_9_9_0
public record LeafMetaData(int createdVersionMajor, Version minVersion, Sort sort, boolean hasBlocks)
extends Record
Provides read-only metadata about a leaf.
- See Also:
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Constructor Summary
ConstructorsConstructorDescriptionLeafMetaData(int createdVersionMajor, Version minVersion, Sort sort, boolean hasBlocks) Expert: Sole constructor. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecreatedVersionMajorrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehasBlocksrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theminVersionrecord component.sort()Returns the value of thesortrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LeafMetaData
Expert: Sole constructor. Public for use by customLeafReaderimpls.
-
-
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 '=='. -
createdVersionMajor
public int createdVersionMajor()Returns the value of thecreatedVersionMajorrecord component.- Returns:
- the value of the
createdVersionMajorrecord component
-
minVersion
Returns the value of theminVersionrecord component.- Returns:
- the value of the
minVersionrecord component
-
sort
Returns the value of thesortrecord component.- Returns:
- the value of the
sortrecord component
-
hasBlocks
public boolean hasBlocks()Returns the value of thehasBlocksrecord component.- Returns:
- the value of the
hasBlocksrecord component
-