public static enum OnlineIndexer.IndexStatePrecondition extends Enum<OnlineIndexer.IndexStatePrecondition>
BUILD_IF_DISABLED
,
BUILD_IF_DISABLED_CONTINUE_BUILD_IF_WRITE_ONLY
, BUILD_IF_DISABLED_REBUILD_IF_WRITE_ONLY
, and
FORCE_BUILD
are sorted in a way so that each option will build the index in more situations than the
ones before it.
Of these, BUILD_IF_DISABLED_CONTINUE_BUILD_IF_WRITE_ONLY
is recommended if there is no reason to believe
current index data is corrupted.
Enum Constant and Description |
---|
BUILD_IF_DISABLED
Only build if the index is disabled.
|
BUILD_IF_DISABLED_CONTINUE_BUILD_IF_WRITE_ONLY
Build if the index is disabled; Continue build if the index is write-only.
|
BUILD_IF_DISABLED_REBUILD_IF_WRITE_ONLY
Build if the index is disabled; Rebuild if the index is write-only.
|
ERROR_IF_DISABLED_CONTINUE_IF_WRITE_ONLY
Error if the index is disabled, or continue to build if the index is write only.
|
FORCE_BUILD
Rebuild the index anyway, no matter it it disabled or write-only or readable.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isContinueIfWriteOnly() |
static OnlineIndexer.IndexStatePrecondition |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OnlineIndexer.IndexStatePrecondition[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OnlineIndexer.IndexStatePrecondition BUILD_IF_DISABLED
public static final OnlineIndexer.IndexStatePrecondition BUILD_IF_DISABLED_CONTINUE_BUILD_IF_WRITE_ONLY
Recommended. This should be sufficient if current index data is not corrupted.
public static final OnlineIndexer.IndexStatePrecondition BUILD_IF_DISABLED_REBUILD_IF_WRITE_ONLY
public static final OnlineIndexer.IndexStatePrecondition FORCE_BUILD
public static final OnlineIndexer.IndexStatePrecondition ERROR_IF_DISABLED_CONTINUE_IF_WRITE_ONLY
OnlineIndexer.buildIndexAsync()
(or its variations) behave same as what it did before
version 2.8.90.0, which is not recommended. BUILD_IF_DISABLED_CONTINUE_BUILD_IF_WRITE_ONLY
should be adopted instead.public static OnlineIndexer.IndexStatePrecondition[] values()
for (OnlineIndexer.IndexStatePrecondition c : OnlineIndexer.IndexStatePrecondition.values()) System.out.println(c);
public static OnlineIndexer.IndexStatePrecondition valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isContinueIfWriteOnly()