Hi,
Thank you reading this newbie question. Elasticsearch instance has mapping (see below) and 10+MM documents. Question is how to query? e.g. consider name is "official_mail_id" and description is "tester@gmail.com"
Thank you in advance for any help.
Mapping:
{
"head" : {
"mappings" : {
"page" : {
"properties" : {
"templates" : {
"properties" : {
"description" : {
"type" : "string"
},
"name" : {
"type" : "string"
}
}
}
}
}
}
}
}
If you don't expect to have too many different "names", it might be better to create individual fields instead of pilling them into a single field. In other words index
{
"official_mail_id": "tester@gmail.com"
}
instead of
{
"name": "official_mail_id",
"description": "tester@gmail.com"
}
Otherwise, if you have multiple names and descriptions per document, the relationship between the descriptions and their names and is not preserved after indexing. Making search for a particular description in a particular field not possible.
This problem can be solved by switching to nested objects, but at the expense of search performance and index size.
Hi Igor,
Thank you for response. there are multiple "name" and associated "description" with it. I had just copy pasted important to me. Apologies for the same.
I am going ahead with planning new mapping which dev team should accommodate. I will keep results posted.
Regards,