Did not find an answer for this on Google.
I have json objects, which contains first_name
and last_name
.
I want to run search that will match if the query is prefix of first_name + last_name
or last_name + first_name
.
E.g. for objects:
{
"first_name":"Leo",
"last_name": "messi"
}
{
"first_name":"Leo",
"last_name": "Cohen"
}
I think that you can do this with a cross-field search.
See: http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_cross_fields_queries.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With