I basically want to do a search which is:
select all from index_name where tag = 'big data' and city = 'tokyo'
The code is:
require "elasticsearch"
client = Elasticsearch::Client.new log: true
client.search index: 'candidates', body:
{
query: {
match: {
tags: search_term
}
}
}
which works fine. When, however, I change to something like:
match: {
tags: search_term, city: 'Tokyo'
}
that is to say just adding another parameter I get an error.
I have tried adding
filter: {
city: 'Tokyo'
}
also with no success.
Thanks guys, what's the best way forward here?