Hi all,
I trying to get the latest row that has the field "inventory", but I also want to filter it with specific ip:
something like that:
GET discovery/hosts/_search
{
"_source": [
"inventory"
],
"query": {
"query": {
"term": {
"ip_address": "192.168.200.14"
},
"exists": {
"field": "inventory"
}
}
},
"sort": {
"timestamp": "desc"
},
"size": 1
}
it doesnt work, however if I query with only the term ot the exists (without the other), it works. I get the data differently so I assume that's why it doesnt work together because there's something I'm missing.
an idea how can I get all rows with that IP which has the "inventory" field (not null)?
thanks