Package org.apache.lucene.index
Class LeafMetaData
java.lang.Object
org.apache.lucene.index.LeafMetaData
Provides read-only metadata about a leaf.
- 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 TypeMethodDescriptionintGet the Lucene version that created this index.Return the minimum Lucene version that contributed documents to this index, ornullif this information is not available.getSort()Return the order in which documents from this index are sorted, ornullif documents are in no particular order.booleanReturnstrueiff this index contains blocks created withIndexWriter.addDocument(Iterable)or it's corresponding update methods with at least 2 or more documents per call.
-
Constructor Details
-
LeafMetaData
Expert: Sole constructor. Public for use by customLeafReaderimpls.
-
-
Method Details
-
getCreatedVersionMajor
public int getCreatedVersionMajor()Get 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. -
getMinVersion
Return the minimum Lucene version that contributed documents to this index, ornullif this information is not available. -
getSort
Return the order in which documents from this index are sorted, ornullif documents are in no particular order. -
hasBlocks
public boolean 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- See Also:
-