Search in all given filed but it return only match filed. so i can send those value on front end

My query - client.search({
index: indexname,
body: {
query: {
multi_match: {
query: req.query.search,
fields: ["description","name","hostname","username","category_name"],
}
},
}
},
it return - [
{
"_index": "onlive",
"_type": "_doc",
"_id": "584",
"_score": 1,
"_source": {
"description": "Free group Yoga session !!! for all levels Experience authentic Yoga from ancient scriptures",
"name": "Free Yoga 108 asanas in 1hr",
"hostname": "ghost",
"username": "account_1",
"category_name": "Other"
}
},
{
....
},
]

My query - client.search({
index: indexname,
body: {
query: {
multi_match: {
query: req.query.search,
fields: ["description","name","hostname","username","category_name"],
}
},
}
},

but When someone type - Yoga it returns data like [{ '_id' : 584 , 'name': 'Free Yoga 108 asanas in 1hr'}]. is this possible.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.