I have a prebuilt list of ip addresses in a seperate file and I was wondering if it is possible to pass these values in that file to the query that uses the filter by the terms (below I want those ip address to be imported from a file)? I have messed around with the multisearch capability but have not been able to get it to work with just passing in a list of these values into a query.
$ curl -XGET http://localhost:9200/ips/_search?pretty -d '{
"version":"true",
"query":{
"constant_score":{
"filter":{
"terms":{
"data":[
"307.121.154.84",
** "142.16.127.132",**
** "132.16.114.138",**
** "197.182.91.243"**
]
}
}
}
},
"sort":[
{
"@timestamp":{
"order":"desc"
}
}
]
}