Understanding maping features

So I have a particular data structure getting imported into elastic search via as JSON. The issue we have is that when it comes to nesting the data itself contains a field that is not easily indexable and we would like to reformat it or remove it.

I saw one of the elastic search engineers at a conference and we had a brief conversation in which he mentioned mapping. I have been reading over this and I can not seem to get a good understanding of it works nor any example describing the data representation.

{
   "id":"fb4fff816114",
   "cmd":"_return",
   "fun":"state.apply",
   "jid":"20181221113646228725",
   "out":"highstate",
   "_stamp":"2018-12-21T11:36:47.410322",
   "return":{
      "file_|-/root/testfoler_|-/root/testfoler_|-directory":{
         "name":"/root/testfoler",
         "__id__":"/root/testfoler",
         "result":true,
         "__sls__":"test",
         "changes":{

         },
         "comment":"The directory /root/testfoler is in the correct state",
         "duration":7.699,
         "pchanges":{

         },
         "start_time":"11:36:47.396154",
         "__run_num__":0
      }
   },
   "retcode":0,
   "success":true,
   "fun_args":[

   ]
}

This is the data structure and ideally, we would like to reformat the following field:

"file_|-/root/testfoler_|-/root/testfoler_|-directory":{

We would either like to move the fields one level up and drop that field for each document in that index but retain the data nested within the field.

We would not mind renaming it to something much shorter. Can anyone who has a better understanding of mapping, I believe dynamic mapping maybe explain it to me better or point in the correct direction to learn how to utilize the power more appropriately

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