Hello is there a way to filter out results in a composite search?
is there a way to set up a filter and or could I use a quarry?
if so how would that look in the DSL search language?
Hello is there a way to filter out results in a composite search?
is there a way to set up a filter and or could I use a quarry?
if so how would that look in the DSL search language?
Hi @iukea,
you can use the bool query to create composite queries, for instance:
GET test/_search
{
"query" : {
"bool" : {
"filter": [
{"range": {"timestamp1": {"gte": "now-1w"}}},
{"range": {"timestamp2": {"gte": "now-2d"}}}
]
}
}
}
Thank you!
would there be a way to do a composite search that grabs all the src_ips from my NGIX logs and filter out the Src_IPs from my Apache logs?
Those logs are in the same index, but there I tell them apart by
type : Apache
- Src_ip
and
type: NGIX
-Src_ip
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.