i have an advanced query with elsticsearch. i want to search for all document that mets a specific requirements.
Document: field1, field2, timestamp
i have also a list of value for field1 and filed2
listField1=[v1,v2,v3......]
listField2=[x1,x2,x3......]
i want seach all documents for (field1= v1 and field2=x1) or (field1=v2 and field2=x2)
Can anyone help me?
the pist that i found is :
{
"query": {
"bool": {
"must": [
{
"range": {
"@timestamp":{"from" : "date1", "to" : "date2" }
}
}
],
"should": [
{
"multi_match": {
"query": "v1",
"fields": ["field1"]
}
},
{
"multi_match": {
"query": "v2",
"fields": ["field1"]
}
}
]
}
}
}
but it need to be more developedPreformatted text