Tagging fields instead of adding new fields

Hi everyone!
I have a file with an array of objects, that host information about different fields - what is there value, have this value changed, etc.
For example:

"changedFieldsList": [
    {
      "fieldId": "PK_NEWJOURNAL",
      "fieldType": "NUMBER",
      "fieldValue": "NULL",
      "fieldChanged": "Y"
    },
    {
      "fieldId": "OFFICE",
      "fieldType": "CHAR",
      "fieldValue": "NULL",
      "fieldChanged": "Y"
    },
    {
      "fieldId": "UPDATE_DATE",
      "fieldType": "DATE",
      "fieldValue": "2017-12-07 05:09:54+03:000",
      "fieldChanged": "Y"
    },
...

The problem is that this structure is making aggregation problems because the names of the fields are the same.

If I want to flat the file in order to have unique field names, is there a way to tag a specific field and add metadata to a field so I still can tell if the field have changed or any other useful metadata, without adding new fields?

Anyone?

Depending on what kind of aggs you want to run, you should better change completely the document (if the number of fields is under 1000).

For example you can't run a date histogram on the text field which represents a date. But if you transform your document you can.

I don't think I understood your proposal though which makes me think that what you proposed is not possible.

Hi, thanks for the answer.
What I mean is I want to know if a certain field has changed.
Is there a way to tag a field as changed (the same way I tag a document when a condition is met) without adding a new field to the document?

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