Module org.elasticsearch.xcore
Class DeprecatedIndexPredicate
java.lang.Object
org.elasticsearch.xpack.core.deprecation.DeprecatedIndexPredicate
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetReindexRequiredPredicate(ProjectMetadata metadata, boolean filterToBlockedStatus, boolean includeSystem) This predicate allows through only indices that were created with a previous lucene version, meaning that they need to be reindexed in order to be writable in the _next_ lucene version.static booleanreindexRequired(IndexMetadata indexMetadata, boolean filterToBlockedStatus, boolean includeSystem) This method check if the indices that were created with a previous lucene version, meaning that they need to be reindexed in order to be writable in the _next_ lucene version.
-
Field Details
-
MINIMUM_WRITEABLE_VERSION_AFTER_UPGRADE
-
-
Constructor Details
-
DeprecatedIndexPredicate
public DeprecatedIndexPredicate()
-
-
Method Details
-
getReindexRequiredPredicate
public static Predicate<Index> getReindexRequiredPredicate(ProjectMetadata metadata, boolean filterToBlockedStatus, boolean includeSystem) This predicate allows through only indices that were created with a previous lucene version, meaning that they need to be reindexed in order to be writable in the _next_ lucene version. It excludes searchable snapshots as they are not writable. It ignores searchable snapshots as they are not writable.- Parameters:
metadata- the cluster metadatafilterToBlockedStatus- if true, only indices that are write blocked will be returned, if false, only those without a block are returnedincludeSystem- if true, all indices including system will be returned, if false, only non-system indices are returned- Returns:
- a predicate that returns true for indices that need to be reindexed
-
reindexRequired
public static boolean reindexRequired(IndexMetadata indexMetadata, boolean filterToBlockedStatus, boolean includeSystem) This method check if the indices that were created with a previous lucene version, meaning that they need to be reindexed in order to be writable in the _next_ lucene version. It excludes searchable snapshots as they are not writable.- Parameters:
indexMetadata- the index metadatafilterToBlockedStatus- if true, only indices that are write blocked will be returned, if false, only those without a block are returnedincludeSystem- if true, all indices including system will be returned, if false, only non-system indices are returned- Returns:
- a predicate that returns true for indices that need to be reindexed
-