0

I have created below index. I want to insert nested data to "companyaddress" recursively using RestHighLevelClient in Spring Boot. Means I want to insert data into companyaddress for every request time.

 "mappings" : {
      "properties" : {
        "company_id" : {
          "type" : "long"
        },
        "company_name" : {
          "type" : "text",
          "analyzer" : "likely_analyzer",
          "search_analyzer" : "standard"
        },
        "companyaddress" : {
          "type" : "nested",
          "properties" : {
            "address3" : {
              "type" : "text",
              "analyzer" : "likely_analyzer",
              "search_analyzer" : "standard"
            },
            "main_phone1" : {
              "type" : "long"
            }
          }
        }
      }
    }
Dorayya
  • 11
  • 1
  • 6
  • Welcome to SO! Can you provide an example of the desired outcome? For more tips see [stackoverflow.com/help/how-to-ask](https://stackoverflow.com/help/how-to-ask). – fpersyn Aug 24 '21 at 11:04
  • find sample outcome. "_source" : { "company_id" : "3", "company_name" : "DEFG", "companyaddress" : [ { "address3" : "smp1", "main_phone1" : "1" }, { "address3" : "chtp2", "main_phone1" : "2" }, { "address3" : "gmd", "main_phone1" : "3" }, { "address3" : "tste", "main_phone1" : "4" } ] } – Dorayya Aug 24 '21 at 12:17

0 Answers0