# Indexing text using Java Rest Client

**URL:** <https://discuss.elastic.co/t/indexing-text-using-java-rest-client/154156>\
**Category:** Elasticsearch\
**Created:** [October 26, 2018, 9:06am UTC](https://discuss.elastic.co/t/indexing-text-using-java-rest-client/154156 "2018-10-26T09:06:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mariusz\_Pala](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mariusz_pala/32/34663_2.png) [@Mariusz\_Pala](https://discuss.elastic.co/u/Mariusz_Pala)\
**Post date:** [October 26, 2018, 9:06am UTC](https://discuss.elastic.co/t/indexing-text-using-java-rest-client/154156/1 "2018-10-26T09:06:44Z")

</div>

Hi, I am indexing data using Java High Rest Client and have a question.  
Everything works fine, but I have a very long text that need to be indexed and it should be indexed in the same way as the attachment ingestion works, so the content should be indexed in the triple-double-quotes so the new lines are retained. When I use API it always gets index with single double quote and new lines escaped.  
Is there any way to do it?

Thank yo,  
Mariusz

---

<div class="post-metadata">

**Author:** ![Vladimir.Dolzhenko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vladimir.dolzhenko/32/34352_2.png) [@Vladimir.Dolzhenko](https://discuss.elastic.co/u/Vladimir.Dolzhenko)\
**Post date:** [November 2, 2018, 9:23am UTC](https://discuss.elastic.co/t/indexing-text-using-java-rest-client/154156/2 "2018-11-02T09:23:56Z")

</div>

Could you please provide code example ? Thanks

---

<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:** [November 30, 2018, 9:24am UTC](https://discuss.elastic.co/t/indexing-text-using-java-rest-client/154156/3 "2018-11-30T09:24:04Z")

</div>

Closed on November 30, 2018, 9:24am UTC

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