Package org.apache.solr.core
Class SolrDeletionPolicy
java.lang.Object
org.apache.lucene.index.IndexDeletionPolicy
org.apache.solr.core.SolrDeletionPolicy
- All Implemented Interfaces:
NamedListInitializedPlugin
public class SolrDeletionPolicy
extends org.apache.lucene.index.IndexDeletionPolicy
implements NamedListInitializedPlugin
Standard Solr deletion policy that allows reserving index commit points for certain amounts of
time to support features such as index replication or snapshotting directly out of a live index
directory.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintvoidinit(org.apache.solr.common.util.NamedList<?> args) initwill be called just once, immediately after creation.voidInternal use for Lucene...voidInternal use for Lucene...voidsetMaxCommitsToKeep(int maxCommitsToKeep) voidsetMaxOptimizedCommitsToKeep(int maxOptimizedCommitsToKeep)
-
Constructor Details
-
SolrDeletionPolicy
public SolrDeletionPolicy()
-
-
Method Details
-
init
public void init(org.apache.solr.common.util.NamedList<?> args) Description copied from interface:NamedListInitializedPlugininitwill be called just once, immediately after creation.Source of the initialization arguments will typically be solrconfig.xml, but will ultimately depends on the plugin itself
- Specified by:
initin interfaceNamedListInitializedPlugin- Parameters:
args- non-null list of initialization parameters (may be empty)
-
onInit
Internal use for Lucene... do not explicitly call.- Specified by:
onInitin classorg.apache.lucene.index.IndexDeletionPolicy- Throws:
IOException
-
onCommit
public void onCommit(List<? extends org.apache.lucene.index.IndexCommit> commits) throws IOException Internal use for Lucene... do not explicitly call.- Specified by:
onCommitin classorg.apache.lucene.index.IndexDeletionPolicy- Throws:
IOException
-
getMaxCommitAge
-
getMaxCommitsToKeep
public int getMaxCommitsToKeep() -
getMaxOptimizedCommitsToKeep
public int getMaxOptimizedCommitsToKeep() -
setMaxCommitsToKeep
public void setMaxCommitsToKeep(int maxCommitsToKeep) -
setMaxOptimizedCommitsToKeep
public void setMaxOptimizedCommitsToKeep(int maxOptimizedCommitsToKeep)
-