# Using doc fields streamable facility

**URL:** <https://discuss.elastic.co/t/using-doc-fields-streamable-facility/9641>\
**Category:** Elasticsearch\
**Created:** [November 9, 2012, 8:19am UTC](https://discuss.elastic.co/t/using-doc-fields-streamable-facility/9641 "2012-11-09T08:19:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atharva\_Patel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atharva_patel/32/2414_2.png) [@Atharva\_Patel](https://discuss.elastic.co/u/Atharva_Patel)\
**Post date:** [November 9, 2012, 8:19am UTC](https://discuss.elastic.co/t/using-doc-fields-streamable-facility/9641/1 "2012-11-09T08:19:04Z")

</div>

I have a use case where I need to append certain amount of text to an  
existing field of the document which has been already indexed earlier.  
After appending I will be reindexing the document. I am predicting the  
amount of data which is going to be stored in that single field of my  
document will be pretty large so I decided not to store the field as well  
as disabled the \_source feature on that document type.

I also feel as there will be several indexing/reindexing operations will be  
going on simultaneously in the JVM (I am currently using Java API), it will  
be highly memory inefficient to bring all such long string object.

I am wondering if the '\*streamability' \*the field in document in Java API  
can be used in someway to make my use case memory efficient. I yes, I would  
like to see a kind of pseudocode or example for steps stream operations to  
follow to achieve the whole use case memory efficiently?

--

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [November 9, 2012, 5:27pm UTC](https://discuss.elastic.co/t/using-doc-fields-streamable-facility/9641/2 "2012-11-09T17:27:27Z")

</div>

If the field is not stored and source is disabled, then there is nothing to  
go on. No data to append to.

Even if things are stored, updating Lucene (and therefore Elasticsearch) is  
a well known issue. Elasticsearch can get around it by using the update  
API, which is essentially a re-indexing on the server side, but it still  
revolves around the Lucene storage format.

--  
Ivan

On Fri, Nov 9, 2012 at 12:19 AM, Atharva Patel [patelatharva@gmail.com](mailto:patelatharva@gmail.com)wrote:

> I have a use case where I need to append certain amount of text to an  
> existing field of the document which has been already indexed earlier.  
> After appending I will be reindexing the document. I am predicting the  
> amount of data which is going to be stored in that single field of my  
> document will be pretty large so I decided not to store the field as well  
> as disabled the \_source feature on that document type.
> 
> I also feel as there will be several indexing/reindexing operations will  
> be going on simultaneously in the JVM (I am currently using Java API), it  
> will be highly memory inefficient to bring all such long string object.
> 
> I am wondering if the '\*streamability' \*the field in document in Java API  
> can be used in someway to make my use case memory efficient. I yes, I would  
> like to see a kind of pseudocode or example for steps stream operations to  
> follow to achieve the whole use case memory efficiently?
> 
> --

--

---

<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:** [July 6, 2017, 3:05am UTC](https://discuss.elastic.co/t/using-doc-fields-streamable-facility/9641/3 "2017-07-06T03:05:06Z")

</div>


