# Field updates (via LUCENE-5189?)

**URL:** <https://discuss.elastic.co/t/field-updates-via-lucene-5189/15035>\
**Category:** Elasticsearch\
**Created:** [December 27, 2013, 2:16pm UTC](https://discuss.elastic.co/t/field-updates-via-lucene-5189/15035 "2013-12-27T14:16:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [December 27, 2013, 2:16pm UTC](https://discuss.elastic.co/t/field-updates-via-lucene-5189/15035/1 "2013-12-27T14:16:29Z")

</div>

Hi,

Does ES offer support for field updates (vs. having to do a complete doc  
delete + add), say via [https://issues.apache.org/jira/browse/LUCENE-5189](https://issues.apache.org/jira/browse/LUCENE-5189) ?

## Thanks, Otis

Performance Monitoring \* Log Analytics \* Search Analytics  
Solr & Elasticsearch Support \* [http://sematext.com/](http://sematext.com/)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ac21e1dc-7a05-48ec-923a-db5d7c0ff3fb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ac21e1dc-7a05-48ec-923a-db5d7c0ff3fb%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [December 27, 2013, 6:18pm UTC](https://discuss.elastic.co/t/field-updates-via-lucene-5189/15035/2 "2013-12-27T18:18:48Z")

</div>

Hi Otis,

No, Elasticsearch doesn't expose field updates.

Field updates are only supported by numeric doc values, which are  
single-valued. In Elasticsearch, all fields may be multi-valued so we  
actually use binary doc values in order to store numeric fields[1].

Moreover, field updates may not scale well when applied to few documents of  
a very large segment since values for all documents need to be rewritten.  
For instance, if you have a large segment that has 100MB of numeric doc  
values and want to update the value for a single document, you need to  
rewrite the 100MB of doc values anyway. So in practice it may be a better  
trade-off to use Elasticsearch's parent/child support with the static data  
in the parent document and frequently changing data in the child documents.

We may use field updates in the future, eg. if we can make sure that there  
is a big enough batch of updates so that rewriting all values is less  
expensive that doing a delete-then-insert for the whole document, but we  
don't have concrete plans at this point.

[1] [Numeric field mappers should encode doc values in binary doc values fields (?) · Issue #3993 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/3993)

On Fri, Dec 27, 2013 at 3:16 PM, Otis Gospodnetic \<  
[otis.gospodnetic@gmail.com](mailto:otis.gospodnetic@gmail.com)\> wrote:

> Hi,
> 
> Does ES offer support for field updates (vs. having to do a complete doc  
> delete + add), say via [[LUCENE-5189] Numeric DocValues Updates - ASF JIRA](https://issues.apache.org/jira/browse/LUCENE-5189) ?
> 
> ## Thanks, Otis
> 
> Performance Monitoring \* Log Analytics \* Search Analytics  
> Solr & Elasticsearch Support \* [http://sematext.com/](http://sematext.com/)
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/ac21e1dc-7a05-48ec-923a-db5d7c0ff3fb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ac21e1dc-7a05-48ec-923a-db5d7c0ff3fb%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Adrien Grand

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4LqxLHgOwgcFoWB%3D13HXHOeWzpi77VLSoO3qf\_bsprLg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j4LqxLHgOwgcFoWB%3D13HXHOeWzpi77VLSoO3qf_bsprLg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:59am UTC](https://discuss.elastic.co/t/field-updates-via-lucene-5189/15035/3 "2017-07-06T01:59:14Z")

</div>


