filter_path parameter
See original GitHub issueHi I was wondering if the filter_path parameter could be specified when building query, to avoid parsing huge elasticsearch responses
Here is my use case: I have the following query where
- I execute a first term aggregation that returns a large number of buckets
- then execute a metric aggregation on this bucket (avg in this example)
- and finally a sum_bucket aggregation
- When I run this query, the output contains all the intermediary my_huge_bucket.my_huge_bucket_metric results but I am only interested by the sum_bucket metric.
Is there a way to strip the intermediary aggregation from the result?
{
"size": 0,
"aggs": {
"my_sum_bucket": {
"sum_bucket": {
"buckets_path": "my_huge_bucket.my_huge_bucket_metric"
}
},
"my_huge_bucket": {
"terms": {
"field": "some_field",
"size": 0
},
"aggs": {
"my_huge_bucket_metric": {
"avg": {
"field": "some_field"
}
}
}
}
}
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Common options | Elasticsearch Guide [8.5] | Elastic
Response Filteringedit. All REST APIs accept a filter_path parameter that can be used to reduce the response returned by Elasticsearch. This parameter takes...
Read more >ElasticSearch: How to use filter_path parameter in POST body
All REST APIs accept a filter_path parameter that can be used to reduce the response returned by Elasticsearch.
Read more >New-DatabaseDocumentation - SQL Change Automation 3
Alternatively, you can use the TemporaryDatabaseServer parameter to specify a SQL Server instance for the temporary ... -FilterPath <System.
Read more >Unable to add maxConcurrentSearches,filterPath in mSearch
I've noticed that mSearch will mess up the request when parameters like maxConcurrentSearches are added: Here's a request with only body ...
Read more >WicketFilter (Wicket Parent 10.0.0-M1-SNAPSHOT API)
Either get the filterPath retrieved from web.xml, or if not found the old (1.3) way via a filter mapping param. protected String.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ilovett the
q
parameter is actually the lucene query string, not a url query string.To specify arbitrary query string parameters all you need to do is add them to the root of the object passed to any api method. So @ilovett 's example would become:
That said, I would also like to add actual support for this and get it listed in the api conventions, so I’ll leave this openYeah, that’s a fair point. Thanks for the tip. I’ll probably update the api docs to have the api conventions at the top of each page, rather than on a new page. Unfortunately they are already so big 😕