# Adding string to elastic

**URL:** <https://discuss.elastic.co/t/adding-string-to-elastic/128480>\
**Category:** Elasticsearch\
**Created:** [April 18, 2018, 8:19am UTC](https://discuss.elastic.co/t/adding-string-to-elastic/128480 "2018-04-18T08:19:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aneesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aneesh/32/37819_2.png) [@aneesh](https://discuss.elastic.co/u/aneesh)\
**Post date:** [April 18, 2018, 8:19am UTC](https://discuss.elastic.co/t/adding-string-to-elastic/128480/1 "2018-04-18T08:19:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 16, 2018, 8:20am UTC](https://discuss.elastic.co/t/adding-string-to-elastic/128480/2 "2018-05-16T08:20:04Z")

</div>

Closed on May 16, 2018, 8:20am UTC

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