Reputation: 1545
I need to search in elasticsearch like
select * from tablename where file.content='xyz' and filePermission.Id='abc'
What query I need to add. Is it possible to give a filter to search query? I have set file.content as a default field.
Upvotes: 0
Views: 82
Reputation: 130
AND SQL queries can be written as a "must bool query":
{
"query" : {
"bool" : {
"must" : [
{ "match" : { "file.content":"xyz"} },
{ "match" : { "filePermission.Id" : "abc"} }
]
}
}
}
Upvotes: 1