Package org.elasticsearch.action.search

Examples of org.elasticsearch.action.search.SearchRequest.preference()


        searchRequest.timeout(request.paramAsTime("timeout", null));
        searchRequest.types(RestActions.splitTypes(request.param("type")));
        searchRequest.queryHint(request.param("query_hint"));
        searchRequest.routing(request.param("routing"));
        searchRequest.preference(request.param("preference"));

        return searchRequest;
    }

    private SearchSourceBuilder parseSearchSource(RestRequest request) {
View Full Code Here


    private SearchRequest buildRequest(ESUpdateNode node) {

        SearchRequest searchRequest = new SearchRequest();
        searchRequest.indices(node.indices());
        searchRequest.types(Constants.DEFAULT_MAPPING_TYPE);
        searchRequest.preference("_primary");

        searchRequest.routing(node.whereClause().clusteredBy().orNull());
        try {
            searchRequest.source(queryBuilder.convert(node), false);
        } catch (IOException e) {
View Full Code Here

            searchRequest.scroll(new Scroll(parseTimeValue(scroll, null)));
        }

        searchRequest.types(Strings.splitStringByCommaToArray(request.param("type")));
        searchRequest.routing(request.param("routing"));
        searchRequest.preference(request.param("preference"));
        searchRequest.indicesOptions(IndicesOptions.fromRequest(request, searchRequest.indicesOptions()));

        return searchRequest;
    }
View Full Code Here

                    copy.types(defaultSearchRequest.types());
                    copy.searchType(defaultSearchRequest.searchType());
                    copy.source(defaultSearchRequest.source(), true);
                    copy.extraSource(defaultSearchRequest.extraSource(), true);
                    copy.routing(defaultSearchRequest.routing());
                    copy.preference(defaultSearchRequest.preference());
                    competitor.settings().addSearchRequest(copy);
                }
            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.