Create a query for which a result field is contained in the query text

Hi

I have the following problem: I would like to create a query in
ElasticSearch for which a field of the result should be contained in the
query text.

Example Query:

{
"query":{
"match":{
"city_name":"Not related Text plus Wil AG"
}
}
}

Result:
{
"_index": "cities",
"_type": "city",
"_id": "z61KRT6QR32dTniAn0_ApQ",
"_score": 6.063552,
"_source": {
"country": "CH",
"city_name": "Birmenstorf AG"
}
}

I would like to define in the query that the field "city_name" of the
result (Birmenstorf AG) has to be contained in the query text (Not related
Text plus Wil AG) o be a match.

Can I do this with ElasticSearch?

Thanks a lot for your help.

Regards
Gian

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.