Java Code Examples for org.elasticsearch.action.support.IndicesOptions#lenientExpandOpen()

The following examples show how to use org.elasticsearch.action.support.IndicesOptions#lenientExpandOpen() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TransportDropTableAction.java    From crate with Apache License 2.0 5 votes vote down vote up
@Override
protected ClusterBlockException checkBlock(DropTableRequest request, ClusterState state) {
    IndicesOptions indicesOptions = INDICES_OPTIONS;
    if (request.isPartitioned()) {
        indicesOptions = IndicesOptions.lenientExpandOpen();
    }
    return state.blocks().indicesBlockedException(ClusterBlockLevel.METADATA_WRITE,
        indexNameExpressionResolver.concreteIndexNames(state, indicesOptions, request.tableIdent().indexNameOrAlias()));
}
 
Example 2
Source File: IndexNameExpressionResolver.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
/**
 * @return whether the specified alias or index exists. If the alias or index contains datemath then that is resolved too.
 */
public boolean hasIndexOrAlias(String aliasOrIndex, ClusterState state) {
    Context context = new Context(state, IndicesOptions.lenientExpandOpen());
    String resolvedAliasOrIndex = dateMathExpressionResolver.resolveExpression(aliasOrIndex, context);
    return state.metaData().getAliasAndIndexLookup().containsKey(resolvedAliasOrIndex);
}
 
Example 3
Source File: ClusterHealthRequest.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public IndicesOptions indicesOptions() {
    return IndicesOptions.lenientExpandOpen();
}
 
Example 4
Source File: Utils.java    From foxtrot with Apache License 2.0 4 votes vote down vote up
public static IndicesOptions indicesOptions() {
    return IndicesOptions.lenientExpandOpen();
}
 
Example 5
Source File: ResizeRequest.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public IndicesOptions indicesOptions() {
    return IndicesOptions.lenientExpandOpen();
}
 
Example 6
Source File: ClusterHealthRequest.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public IndicesOptions indicesOptions() {
    return IndicesOptions.lenientExpandOpen();
}