Hi Folks,
Am looking for option to extract a particular document as per user desire , they wish to filter a document with particular condition like skill and country and last_name.
- I tried out many aggregation process but nothing is achieved as per my requirement
- important thing is user details will share by array of values [“java”,“php”,“Newyork”,“jack”]
- how to get these matched document from mongodb
- i try this below code
[
{
$search: {
index: "boolean",
compound: {
must: [
{
text: {
query: ["java","php","Newyork","jack"],
path: [
"first_name",
"last_name",
"state",
"city",
"skillset.skill",
"prefered_location",
"email",
"employment_details.job_role",
"employment_details.job_skills",
],
},
},
],
should: [
{
text: {
query: ["java","php","Newyork","jack"],
path: [
"first_name",
"last_name",
"state",
"city",
"skillset.skill",
"prefered_location",
"email",
"employment_details.job_role",
"employment_details.job_skills",
],
},
},
],
},
},
}, { $limit: 15 }
]
kindly suggest your thoughts , thanks in Advance