# Is there any documentation on using ctx in scripts?

**URL:** <https://discuss.elastic.co/t/is-there-any-documentation-on-using-ctx-in-scripts/22898>\
**Category:** Elasticsearch\
**Created:** [March 25, 2015, 4:25pm UTC](https://discuss.elastic.co/t/is-there-any-documentation-on-using-ctx-in-scripts/22898 "2015-03-25T16:25:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_G](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@Paul\_G](https://discuss.elastic.co/u/Paul_G)\
**Post date:** [March 25, 2015, 4:25pm UTC](https://discuss.elastic.co/t/is-there-any-documentation-on-using-ctx-in-scripts/22898/1 "2015-03-25T16:25:25Z")

</div>

Hi,

I'm looking for documentation on using the ctx object in transform  
scripts. I've used ctx\_source before but now I need to do more complex  
transformations and add a script to the MongoDB river. On this page I see  
"ctx.op":  
[http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html](http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html)

...and on this page about adding scripts to the MongoDB river are  
"ctx.ignore" and "ctx.deleted" (under "script filters" at the bottom of the  
page):

> **[richardwilly98/elasticsearch-river-mongodb](https://github.com/richardwilly98/elasticsearch-river-mongodb/wiki)**
>
> elasticsearch-river-mongodb - MongoDB River Plugin for ElasticSearch

Where can I find documentation about the properties of the ctx object? I  
looked through the Java API to see if I could find something in the source  
code that might be helpful but was unable to find anything.

Thank you,

Paul

--  
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/bd65ccd6-4c0b-42b8-b696-392e34b48750%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bd65ccd6-4c0b-42b8-b696-392e34b48750%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, 12:24am UTC](https://discuss.elastic.co/t/is-there-any-documentation-on-using-ctx-in-scripts/22898/2 "2017-07-06T00:24:00Z")

</div>


