Adding string to elastic

Hi

How we can add data in the string format, instead of object?

ElasticLowLevelClient objClient = new ElasticLowLevelClient(objSettings);

List<string> listofstrings= new List<string>();
string strData = "{\"RollNo\": \"1\",\"Name\": \"Abc\"}";

var objIndex = new
            {
                index =
              new
              {
                  _index = "test4",
                  _type = "test4",
                  _id = "1"
              }
            };
lstRowsToCache.Add(objIndex.ToString());
lstRowsToCache.Add(strData );


objClient.Bulk<StringResponse>(PostData.MultiJson(listofstrings));

Thanks
Aneesh L

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