This comes directly from the elasticsearch documentation.
client.search({
index: 'myindex',
body: {
query: {
match: {
title: 'test'
}
}
}
}, function (error, response) {
// ...
});
What I am trying to achieve is the same but search for multiple titles.
Sort of the equivallent of if title in ['title1', 'title2', 'title3']
However title: ['title1', 'title2', 'title3'] gives an error as a query string.
There was another suggestion to use filter but it seems to not have any effect. Any suggestion would be greatly appreciated.