Search in sources :

Example 6 with ModifyAliases

use of io.searchbox.indices.aliases.ModifyAliases in project graylog2-server by Graylog2.

the class ClientES6 method removeAliasMapping.

@Override
public void removeAliasMapping(String indexName, String alias) {
    final RemoveAliasMapping removeAliasMapping = new RemoveAliasMapping.Builder(indexName, alias).build();
    final ModifyAliases addAliasRequest = new ModifyAliases.Builder(removeAliasMapping).build();
    executeWithExpectedSuccess(addAliasRequest, "failed to remove alias " + alias + " for index " + indexName);
}
Also used : ModifyAliases(io.searchbox.indices.aliases.ModifyAliases) RemoveAliasMapping(io.searchbox.indices.aliases.RemoveAliasMapping)

Aggregations

ModifyAliases (io.searchbox.indices.aliases.ModifyAliases)6 AddAliasMapping (io.searchbox.indices.aliases.AddAliasMapping)5 RemoveAliasMapping (io.searchbox.indices.aliases.RemoveAliasMapping)3 AliasMapping (io.searchbox.indices.aliases.AliasMapping)2 JestResult (io.searchbox.client.JestResult)1 CreateIndex (io.searchbox.indices.CreateIndex)1 PutMapping (io.searchbox.indices.mapping.PutMapping)1 SearchRequestBuilder (org.elasticsearch.action.search.SearchRequestBuilder)1 SearchSourceBuilder (org.elasticsearch.search.builder.SearchSourceBuilder)1