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_SET
field 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_NAME
andNAMESPACE_URI
. Furthermore a Payload is added toPROPERTIES
fields to indicate the property type.
-
-
Field Summary
Fields Modifier and Type Field Description static IndexFormatVersion
V1
V1 is the index format for Jackrabbit releases 1.0 to 1.3.x.static IndexFormatVersion
V2
V2 is the index format for Jackrabbit releases 1.4.xstatic IndexFormatVersion
V3
V3 is the index format for Jackrabbit releases >= 1.5
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getVersion()
Returns the index format versionstatic IndexFormatVersion
getVersion(IndexReader indexReader)
boolean
isAtLeast(IndexFormatVersion version)
Returnstrue
if this version is at least as high as the givenversion
.String
toString()
-
-
-
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)
Returnstrue
if this version is at least as high as the givenversion
.- Parameters:
version
- the other version to compare.- Returns:
true
if this version is at least as high as the provided;false
otherwise.
-
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.
-
-