Package org.apache.solr.update
Class VersionInfo
- java.lang.Object
-
- org.apache.solr.update.VersionInfo
-
-
Constructor Summary
Constructors Constructor Description VersionInfo(UpdateLog ulog)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SchemaField
getAndCheckVersionField(IndexSchema schema)
Gets and returns theCommonParams.VERSION_FIELD
from the specified schema, after verifying that it is indexed, stored, and single-valued.long
getNewClock()
SchemaField
getVersionField()
Long
getVersionFromIndex(org.apache.lucene.util.BytesRef idBytes)
Returns the latest version from the index, searched by the given id (bytes) as seen from the realtime searcher.Long
lookupVersion(org.apache.lucene.util.BytesRef idBytes)
-
-
-
Constructor Detail
-
VersionInfo
public VersionInfo(UpdateLog ulog)
-
-
Method Detail
-
getAndCheckVersionField
public static SchemaField getAndCheckVersionField(IndexSchema schema) throws org.apache.solr.common.SolrException
Gets and returns theCommonParams.VERSION_FIELD
from the specified schema, after verifying that it is indexed, stored, and single-valued. If any of these pre-conditions are not met, it throws a SolrException with a user suitable message indicating the problem.- Throws:
org.apache.solr.common.SolrException
-
getVersionField
public SchemaField getVersionField()
-
getNewClock
public long getNewClock()
-
lookupVersion
public Long lookupVersion(org.apache.lucene.util.BytesRef idBytes)
-
getVersionFromIndex
public Long getVersionFromIndex(org.apache.lucene.util.BytesRef idBytes)
Returns the latest version from the index, searched by the given id (bytes) as seen from the realtime searcher. Returns null if no document can be found in the index for the given id.
-
-