Matching object name in nested collection full text search mongodb -


we have got nested object in mongo db collection e.g. profile object has got array of address , contacts data.

{ "_id" : "f714af57-b4bd-4c1d-b09c-88f71a446262", "_class" : "com.vaap.dataobject.profilemanagement.companytypeprofile", "companycode" : "ibm", "companyshortname" : "ibm", "companytitle" : "ibm", "companyname" : "ibm", "companydescription" : "ibm", "parentcompanyid" : "", "companyownername" : "", "companyphoneno" : "", "companyemail" : "", "companyfaxno" : "", "companywebsite" : "", "companytotalemployees" : "", "companyannualrevenue" : "", "totalpayperiods" : "", "payperiodstartdate" : "", "companycreditlimit" : "", "companycurrencyid" : "", "addressdata" : [      {         "_id" : "b418982e-4b7a-43c0-aeb6-1ed43ec12f9a",         "addresstypeid" : "efa5d767-41cf-4fa6-b252-70f4113370ea",         "addresstypename" : "business",         "addressname" : "ibm, tysons",         "addressline1" : "123 main street",         "addressline2" : "",         "countryname" : "united states of america",         "countryid" : "b7520372-6dd7-4d76-94a8-4a5eeee26408",         "statename" : "virginia",         "stateid" : "2b155b92-c2f5-44a3-90aa-c188eed38c13",         "cityname" : "fairfax",         "cityid" : "ed8ae0f4-eff6-46fc-a214-89b3451407bd",         "countyname" : "",         "countyid" : "",         "zipcode" : "20152",         "zippluscode" : "",         "ruralcode" : "",         "duration" : "10"     } ], "contactsdata" : [      {         "_id" : "c9389dbd-1b65-4c1a-a9a5-a3c33d89e3b6",         "contacttypename" : "business",         "contacttypeid" : "423571d5-5a3a-4f56-9aed-dbb1cef3d9ad",         "prefix" : "mr.",         "firstname" : "ravi",         "middlename" : "v",         "lastname" : "pulipaka",         "nickname" : "ravi",         "title" : "ceo",         "priorname" : "ravi",         "primarycontactmethodid" : "ae69fea8-1d54-4b98-813b-0313b7571802",         "primarycontactmethodname" : "phone",         "primaryphone" : "703-777-7777",         "primaryemail" : "",         "primaryfaxno" : "",         "secondaryfaxno" : "",         "secondaryphone" : "",         "businessphone" : "",         "homephone" : "",         "personalphone" : "",         "spousephone" : "",         "vacationphone" : "",         "secondaryemail" : "",         "businessemail" : "",         "homeemail" : "",         "personalemail" : "",         "spouseemail" : "",         "alternateemail" : "",         "vacationemail" : "",         "addressline1" : "",         "addressline2" : "",         "countryname" : "",         "countryid" : "",         "statename" : "",         "stateid" : "",         "cityname" : "",         "cityid" : "",         "countyname" : "",         "countyid" : "",         "zipcode" : "",         "zippluscode" : "",         "ruralcode" : ""     } ], "projectsdata" : [], "reccreby" : "rakesh kumar goyal", "reccredate" : "03-mar-2014", "aspectsource" : "ae", "aspecttype" : "customer", "clientid" : "vaap-client-1" 

}

we able search profile collection using mongo db full text search. return results doesn't have information return records matched field in collection. there way know matching field or matching nested object (main profile or contacts data or address data).

i searching "ravi" , interested know whether "ravi" matched in addressdata or contactsdata or profile data itself.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -