Documentation of 'org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy' Java class
KeepOnlyLastCommitDeletionPolicy
org.apache.lucene.index

Class KeepOnlyLastCommitDeletionPolicy

  • All Implemented Interfaces:
    IndexDeletionPolicy


    public final class KeepOnlyLastCommitDeletionPolicy
    extends java.lang.Object
    implements IndexDeletionPolicy
    This IndexDeletionPolicy implementation that keeps only the most recent commit and immediately removes all prior commits after a new commit is done. This is the default deletion policy.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void onCommit(java.util.List commits)
      Deletes all commits except the most recent one.
      void onInit(java.util.List commits)
      Deletes all commits except the most recent one.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KeepOnlyLastCommitDeletionPolicy

        public KeepOnlyLastCommitDeletionPolicy()
    • Method Detail

      • onInit

        public void onInit(java.util.List commits)
        Deletes all commits except the most recent one.
        Specified by:
        onInit in interface IndexDeletionPolicy
        Parameters:
        commits - List of current point-in-time commits, sorted by age (the 0th one is the oldest commit).
      • onCommit

        public void onCommit(java.util.List commits)
        Deletes all commits except the most recent one.
        Specified by:
        onCommit in interface IndexDeletionPolicy
        Parameters:
        commits - List of IndexCommitPoint, sorted by age (the 0th one is the oldest commit).

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.