i have an index of data in ElasticSearch
{
"name":"john",
"type":"main",
"address":"26, pression road, next to maha maul, Atlanta, USA",
"description":"i am from atlanta. i a need of help on elastic search. my name is john wosniak"
},
{
"name":"shailesh",
"type":"other",
"address":"c-401, greenfield road, next to cyber city, mumbai, india",
"description":"i am from mumbai. i dont need. my name shailesh"
},
{
"name":"pratik",
"type":"main",
"address":"c-116, parmar society, john main road, andhari, India",
"description":"i am from andhari. i a need of help on elastic search. my name is pratik doshi, i am good friend of john"
},...
i want to search using some advance query such that it searches "type":"main" and "john" in rest of all the fields.
for now i am using the query
{
"query_string" : {
"fields" : ["name", "type","address", "description"],
"query" : "main john*"
}
}
it is not giving me desired result as per my requirement.
hope i have explained clearly. thanks for the help in advance.