Class VersionInfo

java.lang.Object
org.apache.solr.update.VersionInfo

public class VersionInfo extends Object
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 Details

    • VersionInfo

      public VersionInfo(UpdateLog ulog)
  • Method Details

    • getAndCheckVersionField

      public static SchemaField getAndCheckVersionField(IndexSchema schema) throws org.apache.solr.common.SolrException
      Gets and returns the CommonParams.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.