Class IndexFormatVersion
- java.lang.Object
-
- org.apache.jackrabbit.core.query.lucene.IndexFormatVersion
-
public class IndexFormatVersion extends Object
This class indicates the lucene index format that is used.- Version 1 is the initial index format, which is used for Jackrabbit releases 1.0 to 1.3.x. Unless a re-index happens upgraded Jackrabbit instances will still use this version.
- Version 2 is the index format introduced with Jackrabbit 1.4.x. It
adds a
PROPERTIES_SETfield which contains all property names of a node. This speeds up queries that check the existence of a property. - Version 3 is the index format introduced with Jackrabbit 1.5.x. It
adds support for length and local name queries using the newly added
fields
PROPERTY_LENGTHS,LOCAL_NAMEandNAMESPACE_URI. Furthermore a Payload is added toPROPERTIESfields to indicate the property type.
-
-
Field Summary
Fields Modifier and Type Field Description static IndexFormatVersionV1V1 is the index format for Jackrabbit releases 1.0 to 1.3.x.static IndexFormatVersionV2V2 is the index format for Jackrabbit releases 1.4.xstatic IndexFormatVersionV3V3 is the index format for Jackrabbit releases >= 1.5
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetVersion()Returns the index format versionstatic IndexFormatVersiongetVersion(IndexReader indexReader)booleanisAtLeast(IndexFormatVersion version)Returnstrueif this version is at least as high as the givenversion.StringtoString()
-
-
-
Field Detail
-
V1
public static final IndexFormatVersion V1
V1 is the index format for Jackrabbit releases 1.0 to 1.3.x.
-
V2
public static final IndexFormatVersion V2
V2 is the index format for Jackrabbit releases 1.4.x
-
V3
public static final IndexFormatVersion V3
V3 is the index format for Jackrabbit releases >= 1.5
-
-
Method Detail
-
getVersion
public int getVersion()
Returns the index format version- Returns:
- the index format version.
-
isAtLeast
public boolean isAtLeast(IndexFormatVersion version)
Returnstrueif this version is at least as high as the givenversion.- Parameters:
version- the other version to compare.- Returns:
trueif this version is at least as high as the provided;falseotherwise.
-
toString
public String toString()
-
getVersion
public static IndexFormatVersion getVersion(IndexReader indexReader)
- Returns:
- the index format version of the index used by the given index reader.
-
-