# Custom Script - Native Script IPV6 data type

**URL:** <https://discuss.elastic.co/t/custom-script-native-script-ipv6-data-type/133883>\
**Category:** Elasticsearch\
**Created:** [May 30, 2018, 1:51pm UTC](https://discuss.elastic.co/t/custom-script-native-script-ipv6-data-type/133883 "2018-05-30T13:51:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moni15moni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moni15moni/32/42311_2.png) [@moni15moni](https://discuss.elastic.co/u/moni15moni)\
**Post date:** [May 30, 2018, 1:51pm UTC](https://discuss.elastic.co/t/custom-script-native-script-ipv6-data-type/133883/1 "2018-05-30T13:51:34Z")

</div>

I have faced a issue while using Custom script in java using the AbstractDoubleSearchScript for IPV6 data type.

@Override  
public Object run() {

ScriptDocValues ipv6\_docValue = doc().get("src\_v6");

log.info(" IPV6 value :-" +ipv6\_docValue.getValues().get(0).toString());

}  
I am getting the IP value as follows in ScriptDocValues,

IPV6 Value:- $Ā

But it's stored in indices like "src\_v6" : "2406:c400::"

How can i iterate value, is anything i have missed.

---

<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:** [June 27, 2018, 1:51pm UTC](https://discuss.elastic.co/t/custom-script-native-script-ipv6-data-type/133883/2 "2018-06-27T13:51:42Z")

</div>

Closed on June 27, 2018, 1:51pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
