public interface IndexSchemaManager
A schema has to be created before indexing and searching can happen.
A schema can become obsolete, in which case it needs to be updated (not always possible) or re-created (will drop any indexed data).
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<?> |
createIfMissing()
Creates the schema if it doesn't already exist.
|
CompletableFuture<?> |
createOrUpdate()
Creates the schema if it doesn't already exist,
or updates the existing schema to match requirements expressed by the mapper.
|
CompletableFuture<?> |
createOrValidate(ContextualFailureCollector failureCollector)
Creates the schema if it doesn't already exist,
or validates the existing schema against requirements expressed by the mapper.
|
CompletableFuture<?> |
dropAndCreate()
Drops the schema and all indexed data if it exists,
then creates the schema.
|
CompletableFuture<?> |
dropIfExisting()
Drops the schema and all indexed data if it exists.
|
CompletableFuture<?> |
validate(ContextualFailureCollector failureCollector)
Validates the existing schema against requirements expressed by the mapper.
|
CompletableFuture<?> createIfMissing()
Does not change or validate anything if the schema already exists.
CompletableFuture<?> createOrValidate(ContextualFailureCollector failureCollector)
If the schema exists and validation happens, validation failures do not trigger an exception, but instead are pushed to the given collector.
failureCollector - A collector for validation failures.CompletableFuture<?> createOrUpdate()
Updating the schema may be impossible (for example if the type of a field changed).
In this case, the future will ultimately be completed with a SearchException.
CompletableFuture<?> dropIfExisting()
Does not change anything if the schema does not exists.
CompletableFuture<?> dropAndCreate()
CompletableFuture<?> validate(ContextualFailureCollector failureCollector)
If the schema does not exist, a failure is pushed to the given collector.
If the index exists and validation happens, validation failures do not trigger an exception, but instead are pushed to the given collector.
failureCollector - A collector for validation failures.Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.