Package org.apache.solr.update
Class VersionInfo
java.lang.Object
org.apache.solr.update.VersionInfo
Related to the
_version_ field, in connection with the UpdateLog.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaFieldgetAndCheckVersionField(IndexSchema schema) Gets and returns theCommonParams.VERSION_FIELDfrom the specified schema, after verifying that it is indexed, stored, and single-valued.longgetVersionFromIndex(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.lookupVersion(org.apache.lucene.util.BytesRef idBytes)
-
Constructor Details
-
VersionInfo
-
-
Method Details
-
getAndCheckVersionField
public static SchemaField getAndCheckVersionField(IndexSchema schema) throws org.apache.solr.common.SolrException Gets and returns theCommonParams.VERSION_FIELDfrom 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
-
getNewClock
public long getNewClock() -
lookupVersion
-
getVersionFromIndex
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.
-