Skip to content

Commit 50b7e1c

Browse files
authored
Adding support for source and source_content_type params (#95843)
This PR adds the support for source and source_content_type params in the Search Application search rest endpoint. These params are sometimes used by the rest tests on endpoints that accepts GET requests with a body. Closes #95293
1 parent 49ccc6c commit 50b7e1c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

x-pack/plugin/ent-search/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/entsearch/55_search_application_search.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
setup:
2-
- skip:
3-
version: all
4-
reason: https://github.com/elastic/elasticsearch/issues/95293
5-
62
- do:
73
indices.create:
84
index: test-search-index1

x-pack/plugin/ent-search/src/main/java/org/elasticsearch/xpack/application/search/action/RestQuerySearchApplicationAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public List<Route> routes() {
4040
protected RestChannelConsumer prepareRequest(RestRequest restRequest, NodeClient client) throws IOException {
4141
final String searchAppName = restRequest.param("name");
4242
SearchApplicationSearchRequest request;
43-
if (restRequest.hasContent()) {
44-
request = SearchApplicationSearchRequest.fromXContent(searchAppName, restRequest.contentParser());
43+
if (restRequest.hasContentOrSourceParam()) {
44+
request = SearchApplicationSearchRequest.fromXContent(searchAppName, restRequest.contentOrSourceParamParser());
4545
} else {
4646
request = new SearchApplicationSearchRequest(searchAppName);
4747
}

0 commit comments

Comments
 (0)