How to perform search query on two different data types?
Clash Royale CLAN TAG #URR8PPP How to perform search query on two different data types? my query is very simple, for the sake of even making it simpler, lets say I only search on two fields, name(text) & age(long): GET person_db/person/_search { "query": { "bool": { "should": [ { "match_phrase_prefix": { "name": "hank" } }, { "match_phrase_prefix": { "age": "hank" } } ], "minimum_should_match": 1, "boost": 1.0 } } } if I search for "23", no problem, elastic knows how to change it to numeric and it won't fail, but if the search input is "john" I get error 400 "reason": "failed to create query: {n "bool...." . "reason": "failed to create query: {n "bool...." what should I...