"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "client/rest-high-level/src/main/java/org/elasticsearch/client/RequestConverters.java" between
elasticsearch-6.8.2-src.tar.gz and elasticsearch-6.8.3-src.tar.gz

About: elasticsearch is a Distributed, RESTful, Search Engine built on top of Apache Lucene. Source package (GitHub).

RequestConverters.java  (elasticsearch-6.8.2-src):RequestConverters.java  (elasticsearch-6.8.3-src)
skipping to change at line 395 skipping to change at line 395
addSearchRequestParams(params, searchRequest); addSearchRequestParams(params, searchRequest);
if (searchRequest.source() != null) { if (searchRequest.source() != null) {
request.setEntity(createEntity(searchRequest.source(), REQUEST_BODY_ CONTENT_TYPE)); request.setEntity(createEntity(searchRequest.source(), REQUEST_BODY_ CONTENT_TYPE));
} }
return request; return request;
} }
private static void addSearchRequestParams(Params params, SearchRequest sear chRequest) { private static void addSearchRequestParams(Params params, SearchRequest sear chRequest) {
params.putParam(RestSearchAction.TYPED_KEYS_PARAM, "true"); params.putParam(RestSearchAction.TYPED_KEYS_PARAM, "true");
params.putParam(RestSearchAction.TOTAL_HIT_AS_INT_PARAM, "true");
params.withRouting(searchRequest.routing()); params.withRouting(searchRequest.routing());
params.withPreference(searchRequest.preference()); params.withPreference(searchRequest.preference());
params.withIndicesOptions(searchRequest.indicesOptions()); params.withIndicesOptions(searchRequest.indicesOptions());
params.putParam("search_type", searchRequest.searchType().name().toLower Case(Locale.ROOT)); params.putParam("search_type", searchRequest.searchType().name().toLower Case(Locale.ROOT));
if (searchRequest.requestCache() != null) { if (searchRequest.requestCache() != null) {
params.putParam("request_cache", Boolean.toString(searchRequest.requ estCache())); params.putParam("request_cache", Boolean.toString(searchRequest.requ estCache()));
} }
if (searchRequest.allowPartialSearchResults() != null) { if (searchRequest.allowPartialSearchResults() != null) {
params.putParam("allow_partial_search_results", Boolean.toString(sea rchRequest.allowPartialSearchResults())); params.putParam("allow_partial_search_results", Boolean.toString(sea rchRequest.allowPartialSearchResults()));
} }
skipping to change at line 428 skipping to change at line 429
Request request = new Request(HttpDelete.METHOD_NAME, "/_search/scroll") ; Request request = new Request(HttpDelete.METHOD_NAME, "/_search/scroll") ;
request.setEntity(createEntity(clearScrollRequest, REQUEST_BODY_CONTENT_ TYPE)); request.setEntity(createEntity(clearScrollRequest, REQUEST_BODY_CONTENT_ TYPE));
return request; return request;
} }
static Request multiSearch(MultiSearchRequest multiSearchRequest) throws IOE xception { static Request multiSearch(MultiSearchRequest multiSearchRequest) throws IOE xception {
Request request = new Request(HttpPost.METHOD_NAME, "/_msearch"); Request request = new Request(HttpPost.METHOD_NAME, "/_msearch");
Params params = new Params(request); Params params = new Params(request);
params.putParam(RestSearchAction.TYPED_KEYS_PARAM, "true"); params.putParam(RestSearchAction.TYPED_KEYS_PARAM, "true");
params.putParam(RestSearchAction.TOTAL_HIT_AS_INT_PARAM, "true");
if (multiSearchRequest.maxConcurrentSearchRequests() != MultiSearchReque st.MAX_CONCURRENT_SEARCH_REQUESTS_DEFAULT) { if (multiSearchRequest.maxConcurrentSearchRequests() != MultiSearchReque st.MAX_CONCURRENT_SEARCH_REQUESTS_DEFAULT) {
params.putParam("max_concurrent_searches", Integer.toString(multiSea rchRequest.maxConcurrentSearchRequests())); params.putParam("max_concurrent_searches", Integer.toString(multiSea rchRequest.maxConcurrentSearchRequests()));
} }
XContent xContent = REQUEST_BODY_CONTENT_TYPE.xContent(); XContent xContent = REQUEST_BODY_CONTENT_TYPE.xContent();
byte[] source = MultiSearchRequest.writeMultiLineFormat(multiSearchReque st, xContent); byte[] source = MultiSearchRequest.writeMultiLineFormat(multiSearchReque st, xContent);
request.setEntity(new NByteArrayEntity(source, createContentType(xConten t.type()))); request.setEntity(new NByteArrayEntity(source, createContentType(xConten t.type())));
return request; return request;
} }
skipping to change at line 461 skipping to change at line 463
request.setEntity(createEntity(searchTemplateRequest, REQUEST_BODY_CONTE NT_TYPE)); request.setEntity(createEntity(searchTemplateRequest, REQUEST_BODY_CONTE NT_TYPE));
return request; return request;
} }
static Request multiSearchTemplate(MultiSearchTemplateRequest multiSearchTem plateRequest) throws IOException { static Request multiSearchTemplate(MultiSearchTemplateRequest multiSearchTem plateRequest) throws IOException {
Request request = new Request(HttpPost.METHOD_NAME, "/_msearch/template" ); Request request = new Request(HttpPost.METHOD_NAME, "/_msearch/template" );
Params params = new Params(request); Params params = new Params(request);
params.putParam(RestSearchAction.TYPED_KEYS_PARAM, "true"); params.putParam(RestSearchAction.TYPED_KEYS_PARAM, "true");
params.putParam(RestSearchAction.TOTAL_HIT_AS_INT_PARAM, "true");
if (multiSearchTemplateRequest.maxConcurrentSearchRequests() != MultiSea rchRequest.MAX_CONCURRENT_SEARCH_REQUESTS_DEFAULT) { if (multiSearchTemplateRequest.maxConcurrentSearchRequests() != MultiSea rchRequest.MAX_CONCURRENT_SEARCH_REQUESTS_DEFAULT) {
params.putParam("max_concurrent_searches", Integer.toString(multiSea rchTemplateRequest.maxConcurrentSearchRequests())); params.putParam("max_concurrent_searches", Integer.toString(multiSea rchTemplateRequest.maxConcurrentSearchRequests()));
} }
XContent xContent = REQUEST_BODY_CONTENT_TYPE.xContent(); XContent xContent = REQUEST_BODY_CONTENT_TYPE.xContent();
byte[] source = MultiSearchTemplateRequest.writeMultiLineFormat(multiSea rchTemplateRequest, xContent); byte[] source = MultiSearchTemplateRequest.writeMultiLineFormat(multiSea rchTemplateRequest, xContent);
request.setEntity(new NByteArrayEntity(source, createContentType(xConten t.type()))); request.setEntity(new NByteArrayEntity(source, createContentType(xConten t.type())));
return request; return request;
} }
 End of changes. 3 change blocks. 
0 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)