Hi , we have contacts index .while querying thru java we are getting Total Hits based on the No of Hits. But we want to get the counts based on contacts count inside Hits. Here we have 4 contacts .but we are getting the count as 2. How we can achieve this. also how we can get the data of outside contacts section data with contacts data ? i have taken 1st hits as example. while getting the response i should get the 3 contacts records with outside data.note: Outside data common to all 3 contacts. please help me on this
{
"took" : 4,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 40,
"max_score" : 5.232626,
"hits" : [
{
"_index" : "icontacts",
"_type" : "i_contacts",
"_id" : "1-8DX1HGHLGB",
"_score" : 4.8466597,
"_source" : {
"dName" : "testnew234",
"dPrimaryRegion" : null,
"dId" : "1-8DX1LGB",
"dCreateddt" : "2020-02-25",
"dPrimaryFullName" : "Rajashekhar Sangu",
"dPrimarySId" : "RS47787508",
"contacts" : [
{
"lastName" : "abcd",
"lECountry" : "UNITED STATES",
"contactId" : "1-8DWZ7gfgfDO",
"OContactId" : "1-8DWZ7ghhgE4",
"ContactCreatedDate" : "2020-02-25 03:02:45.0",
"type" : "CLIENT",
"clientIndustryName" : "OFFICE & CLINICS OF DENTISTS",
"clientSector" : "Industrials",
"firstName" : "erwe",
"clientType" : "Legal Counsel",
"lEId" : "1006689635",
"emailAddr" : "sitdsfjk@fd.com",
"lEName" : "25 ASSACENTRAL ASPARK WEST AAAAAALLC",
"Phone" : "+44 7896 587458"
},
{
"lastName" : "abcd",
"lECountry" : "UNITED STATES",
"contactId" : "1-8DWdddZ7DO",
"OContactId" : "1-8DWZgh7E4",
"ContactCreatedDate" : "2020-02-25 03:02:45.0",
"type" : "CLIENT",
"clientIndustryName" : "OFFITTTCE & CLJHKINICS OF DENLKTISTS",
"clientSector" : "Industrials",
"firstName" : "erwe",
"clientType" : "Legal - Arranger",
"lEId" : "1006689635",
"emailAddr" : "sitdsfjk@fd.com",
"lEName" : "25 CEDSSNTRAL PAGJRK WEST LLC",
"Phone" : "+44 7896 587458"
},
{
"lastName" : "abcd",
"lECountry" : "UNITED STATES",
"contactId" : "1-8DWZsdf7DO",
"OContactId" : "1-8DWZwqu7E4",
"ContactCreatedDate" : "2020-02-25 03:02:45.0",
"type" : "CLIENT",
"clientIndustryName" : "OFFICES & CLINSICS OF DENTSISTS",
"clientSector" : "Industrials",
"firstName" : "erwe",
"clientType" : "Legal Counsel",
"lEId" : "1006689635",
"emailAddr" : "sitdsfjk@fd.com",
"lEName" : "25 CENTRDDFAL PARK WEUUST LLC",
"Phone" : "+44 7896 587458"
}
]
}
},
{ "_index" : "icontacts",
"_type" : "i_contacts",
"_id" : "1-8DX1HGHLGB",
"_score" : 4.8466597,
"_source" : {
"dName" : "testnew2345",
"dPrimaryRegion" : null,
"dId" : "1-8DX1LDGB",
"dCreateddt" : "2020-02-25",
"dPrimaryFullName" : "Rajashekgfgfhar Sangu",
"dPrimarySId" : "RS4778ss7508",
"contacts" : [
{
"lastName" : "abasdcd",
"lECountry" : "UNITED STATES",
"contactId" : "1-8DWZ7gfgfDO",
"OContactId" : "1-8DWZ7ghasdhgE4",
"ContactCreatedDate" : "2020-02-25 03:02:45.0",
"type" : "CLIENT",
"clientIndustryName" : "OFFIasdCE & CLINICS OF DENTISTS",
"clientSector" : "Industrials",
"firstName" : "erwe",
"clientType" : "Legal Counsel",
"lEId" : "1006689635",
"emailAddr" : "sitdsfjk@fd.com",
"lEName" : "25 ASSACENTRAL ASPARK WEST AAAAAALLC",
"Phone" : "+44 7896 587458"
}
]
}
}
]
}
}