Reputation: 2228
Similar to elasticsearch match two fields, I would like to execute a query in ES that uses OR operator
SELECT * FROM [mytype] WHERE title = 'some title' OR title = 'something else'
Upvotes: 2
Views: 60
Reputation: 16192
You can use bool/should
clause
{
"query":{
"bool":{
"should":[
{
"match":{
"title":"some title"
}
},
{
"match":{
"title":"something else"
}
}
]
}
}
}
Upvotes: 2