Class VersionInfo


  • public class VersionInfo
    extends Object
    • Constructor Detail

      • VersionInfo

        public VersionInfo​(UpdateLog ulog,
                           int nBuckets)
    • Method Detail

      • 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
      • getVersionBucketLockTimeoutMs

        public int getVersionBucketLockTimeoutMs()
      • reload

        public void reload()
      • getVersionField

        public SchemaField getVersionField()
      • lockForUpdate

        public void lockForUpdate()
      • unlockForUpdate

        public void unlockForUpdate()
      • blockUpdates

        public void blockUpdates()
      • unblockUpdates

        public void unblockUpdates()
      • getNewClock

        public long getNewClock()
      • getOldClock

        public long getOldClock()
      • updateClock

        public void updateClock​(long clock)
      • 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.