Get the matched and unmatched result based on fields inside an index

Hi All , I'm new to Elasticsearch, please can someone help on this
I want to matched and unmatched data based on fields from index.
Sample of Data Schema of index :

{
"_index": "comparebyid",
"_id": "MPGsra40AGzOIw1d4LlG5dkAAAAAAAAA",
"_score": 1,
"_source": {
"compare": "match",
"Document": [
{
"doc": {
"clientName": "Domino's",
"phone": "7787888888",
"dOB": "",
"id": "005c023e-dee9-402a-8841-f892855ecf3e",
"typeData": "Zero_Data",
"email": "Dom@kc.com"
}
},
{
"doc": {
"id": "005c023e-dee9-402a-8841-f892855ecf3e",
"typeData": "KC_App",
"clientName": "Domino's",
"dOB": ""
}
}
]
}
},
{
"_index": "comparebyid",
"_id": "MNRSJju9ye_dP5Xyj6Hagc0AAAAAAAAA",
"_score": 1,
"_source": {
"compare": "match",
"Document": [
{
"doc": {
"id": "0085b9d3-d711-4230-9bce-f1466a509959",
"typeData": "KC_App",
"clientName": "Royal J",
"dOB": ""
}
},
{
"doc": {
"clientName": "Royal J",
"phone": "7412369859",
"dOB": "",
"id": "0085b9d3-d711-4230-9bce-f1466a509959",
"typeData": "Zero_Data",
"email": "royal@gmail.com"
}
}
]
}
}..................

So I want to the matched and unmatched result based on 'email ' and 'dob' fields in case of "compare": "mismatch".

Like this :
Document.doc[0].email = Document.doc[1].email Document.doc[0].dob= Document.doc[1].dob =>atlease min 50 % match then =>>
it will give 'matched', otherwise 'mismatch'

I hope , my question is cleared, if not please let me know.
I will be eagerly waiting for response.

Thank you in advance.

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