you need to use a bool query.
bool is used to combine a few conditions together.
So your query will be something like (just high level pseudo code) -->
{
"query": {
"bool": {
"must": [
"bool": {
"should": [
{"term": {"city": "Berlin"}},
{"term": {"city": "Prague"}}
]},
{"wildcard": {"name": "john*"}}
}
]
}
}
Here is a good example.
And another one