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. Version 1 formats do not have the PROPERTIES_SET lucene fieldname and queries assuming this format also run on newer versions. When the index is recreated from scratch, the Version 2 format will automatically be used. This format is faster certain queries, so if the index does not contain PROPERTIES_SET fieldname and re-indexing is an option, this is advisable. Existing indexes are not automatically upgraded to a newer version!


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
 
Method Summary
 int getVersion()
          Returns the index format version
static IndexFormatVersion getVersion(org.apache.lucene.index.IndexReader indexReader)
           
 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

Method Detail

getVersion

public int getVersion()
Returns the index format version

Returns:
the index format version.

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-2008 The Apache Software Foundation. All Rights Reserved.