# LookupScript per shard modification (native scripting)

**URL:** <https://discuss.elastic.co/t/lookupscript-per-shard-modification-native-scripting/19069>\
**Category:** Elasticsearch\
**Created:** [August 4, 2014, 2:01pm UTC](https://discuss.elastic.co/t/lookupscript-per-shard-modification-native-scripting/19069 "2014-08-04T14:01:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_S\_V](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_s_v/32/1317_2.png) [@Alex\_S\_V](https://discuss.elastic.co/u/Alex_S_V)\
**Post date:** [August 4, 2014, 2:01pm UTC](https://discuss.elastic.co/t/lookupscript-per-shard-modification-native-scripting/19069/1 "2014-08-04T14:01:56Z")

</div>

Hi,

I'm trying LookupScript example here:  
[https://github.com/imotov/elasticsearch-native-script-example/blob/master/src/main/java/org/elasticsearch/examples/nativescript/script/LookupScript.java](https://github.com/imotov/elasticsearch-native-script-example/blob/master/src/main/java/org/elasticsearch/examples/nativescript/script/LookupScript.java)

The idea of my script is to pre-cache all child documents in LookupScript  
instance, but I want to query only current shard data. Is it possible? So  
every shard instance caches only it's documents.

Regards,  
Alex

--  
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/bada48a1-7b74-41a0-81a9-564b5061b605%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bada48a1-7b74-41a0-81a9-564b5061b605%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:11am UTC](https://discuss.elastic.co/t/lookupscript-per-shard-modification-native-scripting/19069/2 "2017-07-06T01:11:02Z")

</div>

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


