org.elasticsearch.action.IndicesRequest Java Examples

The following examples show how to use org.elasticsearch.action.IndicesRequest. 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: PercolateRequest.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public List<? extends IndicesRequest> subRequests() {
    List<IndicesRequest> requests = new ArrayList<>();
    requests.add(this);
    if (getRequest != null) {
        requests.add(getRequest);
    }
    return requests;
}
 
Example #2
Source File: MultiPercolateRequest.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
public List<? extends IndicesRequest> subRequests() {
    List<IndicesRequest> indicesRequests = new ArrayList<>();
    for (PercolateRequest percolateRequest : this.requests) {
        indicesRequests.addAll(percolateRequest.subRequests());
    }
    return indicesRequests;
}
 
Example #3
Source File: BulkRequest.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
public List<? extends IndicesRequest> subRequests() {
    List<IndicesRequest> indicesRequests = new ArrayList<>();
    for (ActionRequest request : requests) {
        assert request instanceof IndicesRequest;
        indicesRequests.add((IndicesRequest) request);
    }
    return indicesRequests;
}
 
Example #4
Source File: IngestRequest.java    From elasticsearch-helper with Apache License 2.0 5 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
public List<? extends IndicesRequest> subRequests() {
    List<IndicesRequest> indicesRequests = Lists.newArrayList();
    for (ActionRequest<?> request : requests) {
        assert request instanceof IndicesRequest;
        indicesRequests.add((IndicesRequest) request);
    }
    return indicesRequests;
}
 
Example #5
Source File: IndexNameExpressionResolver.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
/**
 * Same as {@link #concreteIndices(ClusterState, IndicesOptions, String...)}, but the index expressions and options
 * are encapsulated in the specified request.
 */
public String[] concreteIndices(ClusterState state, IndicesRequest request) {
    Context context = new Context(state, request.indicesOptions());
    return concreteIndices(context, request.indices());
}
 
Example #6
Source File: IndicesAliasesRequest.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public List<? extends IndicesRequest> subRequests() {
    return allAliasActions;
}
 
Example #7
Source File: MultiSearchRequest.java    From Elasticsearch with Apache License 2.0 4 votes vote down vote up
@Override
public List<? extends IndicesRequest> subRequests() {
    return this.requests;
}
 
Example #8
Source File: ClusteringAction.java    From elasticsearch-carrot2 with Apache License 2.0 4 votes vote down vote up
@Override
public IndicesRequest indices(String... strings) {
   return searchRequest.indices(strings);
}
 
Example #9
Source File: IndexNameExpressionResolver.java    From crate with Apache License 2.0 4 votes vote down vote up
/**
 * Same as {@link #concreteIndexNames(ClusterState, IndicesOptions, String...)}, but the index expressions and options
 * are encapsulated in the specified request.
 */
public String[] concreteIndexNames(ClusterState state, IndicesRequest request) {
    Context context = new Context(state, request.indicesOptions());
    return concreteIndexNames(context, request.indices());
}
 
Example #10
Source File: IndexNameExpressionResolver.java    From crate with Apache License 2.0 4 votes vote down vote up
/**
 * Same as {@link #concreteIndices(ClusterState, IndicesOptions, String...)}, but the index expressions and options
 * are encapsulated in the specified request.
 */
public Index[] concreteIndices(ClusterState state, IndicesRequest request) {
    Context context = new Context(state, request.indicesOptions());
    return concreteIndices(context, request.indices());
}