/** * Set up the read {@link IndicesOptions}. Default is set to {@link IndicesOptions#strictExpandOpenAndForbidClosed()}. * * @return {@literal null} to use the server defaults. */ @Nullable protected IndicesOptions indicesOptions() { return IndicesOptions.strictExpandOpenAndForbidClosed(); }
protected void updateRequestWithIndexAndRoutingOptions(Select select, SearchRequestBuilder request) { for (Hint hint : select.getHints()) { if (hint.getType() == HintType.IGNORE_UNAVAILABLE) { //saving the defaults from TransportClient search request.setIndicesOptions(IndicesOptions.fromOptions(true, false, true, false, IndicesOptions.strictExpandOpenAndForbidClosed())); } if (hint.getType() == HintType.ROUTINGS) { Object[] routings = hint.getParams(); String[] routingsAsStringArray = new String[routings.length]; for (int i = 0; i < routings.length; i++) { routingsAsStringArray[i] = routings[i].toString(); } request.setRouting(routingsAsStringArray); } } }
/** * Add a search request to execute. Note, the order is important, the search response will be returned in the * same order as the search requests. * <p> * If ignoreIndices has been set on the search request, then the indicesOptions of the multi search request * will not be used (if set). */ public MultiSearchRequestBuilder add(SearchRequest request) { if (request.indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && request().indicesOptions() != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.indicesOptions(request().indicesOptions()); } super.request.add(request); return this; }
/** * Embeds a percolate request to this multi percolate request */ public MultiPercolateRequest add(PercolateRequest request) { if (request.indices() == null && indices != null) { request.indices(indices); } if (request.documentType() == null && documentType != null) { request.documentType(documentType); } if (request.indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && indicesOptions != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.indicesOptions(indicesOptions); } requests.add(request); return this; }
/** * Add a search request to execute. Note, the order is important, the search response will be returned in the * same order as the search requests. * <p> * If ignoreIndices has been set on the search request, then the indicesOptions of the multi search request * will not be used (if set). */ public MultiSearchRequestBuilder add(SearchRequest request) { if (request.indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && request().indicesOptions() != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.indicesOptions(request().indicesOptions()); } super.request.add(request); return this; }
/** * Add a search request to execute. Note, the order is important, the search response will be returned in the * same order as the search requests. * <p> * If ignoreIndices has been set on the search request, then the indicesOptions of the multi search request * will not be used (if set). */ public MultiSearchRequestBuilder add(SearchRequest request) { if (request.indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && request().indicesOptions() != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.indicesOptions(request().indicesOptions()); } super.request.add(request); return this; }
/** * Add a search request to execute. Note, the order is important, the search response will be returned in the * same order as the search requests. * <p> * If ignoreIndices has been set on the search request, then the indicesOptions of the multi search request * will not be used (if set). */ public MultiSearchRequestBuilder add(SearchRequest request) { if (request.indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && request().indicesOptions() != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.indicesOptions(request().indicesOptions()); } super.request.add(request); return this; }
/** * Add a search request to execute. Note, the order is important, the search response will be returned in the * same order as the search requests. * <p> * If ignoreIndices has been set on the search request, then the indicesOptions of the multi search request * will not be used (if set). */ public MultiSearchRequestBuilder add(SearchRequest request) { if (request.indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && request().indicesOptions() != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.indicesOptions(request().indicesOptions()); } super.request.add(request); return this; }
/** * Add a search request to execute. Note, the order is important, the search response will be returned in the * same order as the search requests. */ public MultiSearchRequestBuilder add(SearchRequestBuilder request) { if (request.request().indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && request().indicesOptions() != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.request().indicesOptions(request().indicesOptions()); } super.request.add(request); return this; }
/** * Add a search request to execute. Note, the order is important, the search response will be returned in the * same order as the search requests. */ public MultiSearchRequestBuilder add(SearchRequestBuilder request) { if (request.request().indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && request().indicesOptions() != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.request().indicesOptions(request().indicesOptions()); } super.request.add(request); return this; }
public MultiSearchTemplateRequestBuilder add(SearchTemplateRequest request) { if (request.getRequest().indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && request().indicesOptions() != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.getRequest().indicesOptions(request().indicesOptions()); } super.request.add(request); return this; }
public MultiSearchTemplateRequestBuilder add(SearchTemplateRequest request) { if (request.getRequest().indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && request().indicesOptions() != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.getRequest().indicesOptions(request().indicesOptions()); } super.request.add(request); return this; }
/** * Add a search request to execute. Note, the order is important, the search response will be returned in the * same order as the search requests. */ public MultiSearchRequestBuilder add(SearchRequestBuilder request) { if (request.request().indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && request().indicesOptions() != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.request().indicesOptions(request().indicesOptions()); } super.request.add(request); return this; }
/** * Add a search request to execute. Note, the order is important, the search response will be returned in the * same order as the search requests. */ public MultiSearchRequestBuilder add(SearchRequestBuilder request) { if (request.request().indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && request().indicesOptions() != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.request().indicesOptions(request().indicesOptions()); } super.request.add(request); return this; }
continue; IndicesOptions defaultOptions = IndicesOptions.strictExpandOpenAndForbidClosed();
public MultiSearchRequest add(byte[] data, int from, int length, boolean isTemplateRequest, @Nullable String[] indices, @Nullable String[] types, @Nullable String searchType) throws Exception { return add(new BytesArray(data, from, length), isTemplateRequest, indices, types, searchType, null, IndicesOptions.strictExpandOpenAndForbidClosed(), true); }
public MultiSearchTemplateRequestBuilder add(SearchTemplateRequestBuilder request) { if (request.request().getRequest().indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && request().indicesOptions() != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.request().getRequest().indicesOptions(request().indicesOptions()); } super.request.add(request); return this; }
public MultiSearchTemplateRequestBuilder add(SearchTemplateRequestBuilder request) { if (request.request().getRequest().indicesOptions() == IndicesOptions.strictExpandOpenAndForbidClosed() && request().indicesOptions() != IndicesOptions.strictExpandOpenAndForbidClosed()) { request.request().getRequest().indicesOptions(request().indicesOptions()); } super.request.add(request); return this; }
protected void updateRequestWithIndexAndRoutingOptions(Select select, SearchRequestBuilder request) { for(Hint hint : select.getHints()){ if(hint.getType() == HintType.IGNORE_UNAVAILABLE){ //saving the defaults from TransportClient search request.setIndicesOptions(IndicesOptions.fromOptions(true, false, true, false, IndicesOptions.strictExpandOpenAndForbidClosed())); } if(hint.getType() == HintType.ROUTINGS){ Object[] routings = hint.getParams(); String[] routingsAsStringArray = new String[routings.length]; for(int i=0;i<routings.length;i++){ routingsAsStringArray[i]=routings[i].toString(); } request.setRouting(routingsAsStringArray); } } }
percolateRequest.documentType(documentType); if (indicesOptions != IndicesOptions.strictExpandOpenAndForbidClosed()) { percolateRequest.indicesOptions(indicesOptions);