Reputation: 1658
How I can get this simple query in Elasticsearch?
SELECT * FROM [mytype] WHERE name = alex AND health = good
I'm really having troubles with its syntax, multi-match queries don't work in my case, what type of query should I use?
Upvotes: 0
Views: 137
Reputation: 33364
You can use multiple must
clauses in a bool query to combine queries. For example,
{
"query": {
"bool": {
"must": [
{
"term": {"name" : "alex"}
},
{
"term": {"health" : "good"}
}
]
}
}
}
Upvotes: 1