org.apache.jackrabbit.core.query.lucene
Class IndexFormatVersion

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.IndexFormatVersion

public class IndexFormatVersion
extends Object

This class indicates the lucene index format that is used.

Please note that existing indexes are not automatically upgraded to a newer version! If you want to take advantage of a certain 'feature' in an index format version you need to re-index the repository.


Field Summary
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.x
static IndexFormatVersion V3
          V3 is the index format for Jackrabbit releases >= 1.5
 
Method Summary
 int getVersion()
          Returns the index format version
static IndexFormatVersion getVersion(org.apache.lucene.index.IndexReader indexReader)
           
 boolean isAtLeast(IndexFormatVersion version)
          Returns true if this version is at least as high as the given version.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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)
Returns true if this version is at least as high as the given version.

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()
Overrides:
toString in class Object
Returns:
a string representation of this index format version.

getVersion

public static IndexFormatVersion getVersion(org.apache.lucene.index.IndexReader indexReader)
Returns:
the index format version of the index used by the given index reader.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.