# Plugin development : doc.get(key) types?

**URL:** <https://discuss.elastic.co/t/plugin-development-doc-get-key-types/13584>\
**Category:** Elasticsearch\
**Created:** [September 13, 2013, 4:41am UTC](https://discuss.elastic.co/t/plugin-development-doc-get-key-types/13584 "2013-09-13T04:41:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yann\_Barraud](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yann_barraud/32/1108_2.png) [@Yann\_Barraud](https://discuss.elastic.co/u/Yann_Barraud)\
**Post date:** [September 13, 2013, 4:41am UTC](https://discuss.elastic.co/t/plugin-development-doc-get-key-types/13584/1 "2013-09-13T04:41:10Z")

</div>

Hi,

I'm building a new plugin, but did not find a simple way to parse a  
matching doc.

I wish to get doc.get(key) values wether in their original type  
(ScriptDocValues.xxx) or as String. Am I obliged to iterate  
throughScriptDocValues types ?

Thanks.

Regards,  
Yann

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Yann\_Barraud](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yann_barraud/32/1108_2.png) [@Yann\_Barraud](https://discuss.elastic.co/u/Yann_Barraud)\
**Post date:** [September 20, 2013, 4:37pm UTC](https://discuss.elastic.co/t/plugin-development-doc-get-key-types/13584/2 "2013-09-20T16:37:41Z")

</div>

Hi,  
For anyone interested, you'll find what I did here :

> <https://github.com/YannBrrd/elasticsearch-entity-resolution/blob/0.2/src/main/java/org/yaba/entity/script/EntityResolutionScript.java#L410>

If you have any suggestion about doing better, I'll be glad to know.

Regards,

Yann

Le vendredi 13 septembre 2013 06:41:10 UTC+2, Yann Barraud a écrit :

> Hi,
> 
> I'm building a new plugin, but did not find a simple way to parse a  
> matching doc.
> 
> I wish to get doc.get(key) values wether in their original type  
> (ScriptDocValues.xxx) or as String. Am I obliged to iterate  
> throughScriptDocValues types ?
> 
> Thanks.
> 
> Regards,  
> Yann

--  
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).  
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, 2:15am UTC](https://discuss.elastic.co/t/plugin-development-doc-get-key-types/13584/3 "2017-07-06T02:15:21Z")

</div>

Closed on July 6, 2017, 2:15am UTC


