I want to query similary follow's SQL :
select * from talbe where id=cityid
Who know how to implement in es ?
thanks for your answer !
I want to query similary follow's SQL :
select * from talbe where id=cityid
Who know how to implement in es ?
thanks for your answer !
You can do this with a script filter like this:
POST /table/_search
{
"query": {
"bool": {
"filter": {
"script": {
"script": "doc.id.value == doc.cityid.value"
}
}
}
}
}
== in groovy is like equals in Javaelasticsearch.yml, restart ES and that's it.