Add dynamic key as new field


(Gusti Andika) #1

Hi,

I'm trying to create mappings which contains dynamic template to be able to add

following are the sample document to be indexed:

{
    "report" : [
          {
          "report name1" : [
                          { "key1" : "value1"}, {"key2" : "value2"}
                  ]
          },

         {
          "report name2" : [
                            { "key1" : "value1"}, {"key2" : "value2"}
                     ]
          }
  ]
}

I would like to be able to search for "report name1" and "report name2", how I can create mappings for this scenario using dynamic template?


(system) #2