# POST to \_update, and CompileException

**URL:** <https://discuss.elastic.co/t/post-to--update-and-compileexception/19845>\
**Category:** Elasticsearch\
**Created:** [September 17, 2014, 1:07pm UTC](https://discuss.elastic.co/t/post-to--update-and-compileexception/19845 "2014-09-17T13:07:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Bruse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martin_bruse/32/1276_2.png) [@Martin\_Bruse](https://discuss.elastic.co/u/Martin_Bruse)\
**Post date:** [September 17, 2014, 1:07pm UTC](https://discuss.elastic.co/t/post-to--update-and-compileexception/19845/1 "2014-09-17T13:07:52Z")

</div>

Hello elasticsearch list!

I try to update a document using the \_update endpoint, but I can't make it  
work.

The same code works fine when I run it in plain groovy.

See [http://pastie.org/9561774](http://pastie.org/9561774) and note that the code in the elagrov file is  
the same as in the script field in the POST, and yet does not create a  
compile error...

How can I make this work? 😮

best regards,  
Martin

--  
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/6998492a-05d5-40a7-b3ac-49f8543691b8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6998492a-05d5-40a7-b3ac-49f8543691b8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:01am UTC](https://discuss.elastic.co/t/post-to--update-and-compileexception/19845/2 "2017-07-06T01:01:35Z")

</div>

Closed on July 6, 2017, 1:01am UTC


