I have the following document that is being loaded into elasticseatch 6:
{
"DataChangeInfo" : "Archive Log Set archiveLogSet.2,
"documentsList" : [
{
"commandScn": "25933758",
"commandCommitScn": "0",
"commandSequence": "3",
"commandType": "INSERT",
"commandTimestamp": "2017-12-07 05:09:54+03:00",
"objectDBName": "D",
"objectSchemaName": "CFTNAXDEV",
"objectId": "NERNAL",
"changedFieldsList": [
{
"fieldId": "PK_NEWJOURNAL",
"fieldType": "NUMBER",
"fieldValue": "NULL",
"fieldChanged": "Y"
},
{
"fieldId": "DESCRIPTION",
"fieldType": "VARCHAR2",
"fieldValue": "hello there",
"fieldChanged": "Y"
},
{
"fieldId": "STATUS",
"fieldType": "VARCHAR2",
"fieldValue": "NULL",
"fieldChanged": "Y"
},
{
"fieldId": "REFERENCE",
"fieldType": "VARCHAR2",
"fieldValue": "NULL",
"fieldChanged": "Y"
},
{
"fieldId": "CITY",
"fieldType": "VARCHAR",
"fieldValue": "NY",
"fieldChanged": "Y"
},
{
"fieldId": "ACTIONID2",
"fieldType": "NUMBER",
"fieldValue": "NULL",
"fieldChanged": "Y"
},
{
"fieldId": "LOG_DATE2",
"fieldType": "TIMESTAMP(6) WITH TIME ZONE",
"fieldValue": "2017-12-06 22:09:54.941-05:00",
"fieldChanged": "Y"
}
],
"conditionFieldsList": []
}
]
}
I want to search for a specific field value, when certain fieldId condition is met.
for example, I want all the cities in all documents. Meaning: I want all fieldValue when fieldId is equal to "CITY".
What kind of mapping to I need to make this an option?
What kind of query will yeild the result I want?