Run a search application search
Beta
All methods and paths for this operation:
Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template. Unspecified template parameters are assigned their default values if applicable.
Query parameters
-
Determines whether aggregation names are prefixed by their respective types in the response.
POST _application/search_application/my-app/_search
{
"params": {
"query_string": "my first query",
"text_fields": [
{"name": "title", "boost": 5},
{"name": "description", "boost": 1}
]
}
}
resp = client.search_application.search(
name="my-app",
params={
"query_string": "my first query",
"text_fields": [
{
"name": "title",
"boost": 5
},
{
"name": "description",
"boost": 1
}
]
},
)
const response = await client.searchApplication.search({
name: "my-app",
params: {
query_string: "my first query",
text_fields: [
{
name: "title",
boost: 5,
},
{
name: "description",
boost: 1,
},
],
},
});
response = client.search_application.search(
name: "my-app",
body: {
"params": {
"query_string": "my first query",
"text_fields": [
{
"name": "title",
"boost": 5
},
{
"name": "description",
"boost": 1
}
]
}
}
)
$resp = $client->searchApplication()->search([
"name" => "my-app",
"body" => [
"params" => [
"query_string" => "my first query",
"text_fields" => array(
[
"name" => "title",
"boost" => 5,
],
[
"name" => "description",
"boost" => 1,
],
),
],
],
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"params":{"query_string":"my first query","text_fields":[{"name":"title","boost":5},{"name":"description","boost":1}]}}' "$ELASTICSEARCH_URL/_application/search_application/my-app/_search"
client.searchApplication().search(s -> s
.name("my-app")
.params(Map.of("text_fields", JsonData.fromJson("[{\"name\":\"title\",\"boost\":5},{\"name\":\"description\",\"boost\":1}]"),"query_string", JsonData.fromJson("\"my first query\"")))
);
{
"params": {
"query_string": "my first query",
"text_fields": [
{"name": "title", "boost": 5},
{"name": "description", "boost": 1}
]
}
}