# Elasticsearch custom ingest plugin error when indexing with a field of type doble\[\]

**URL:** <https://discuss.elastic.co/t/elasticsearch-custom-ingest-plugin-error-when-indexing-with-a-field-of-type-doble/183488>\
**Category:** Elasticsearch\
**Created:** [May 30, 2019, 8:47am UTC](https://discuss.elastic.co/t/elasticsearch-custom-ingest-plugin-error-when-indexing-with-a-field-of-type-doble/183488 "2019-05-30T08:47:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Borwick\_5576](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/borwick_5576/32/44759_2.png) [@Borwick\_5576](https://discuss.elastic.co/u/Borwick_5576)\
**Post date:** [May 30, 2019, 8:47am UTC](https://discuss.elastic.co/t/elasticsearch-custom-ingest-plugin-error-when-indexing-with-a-field-of-type-doble/183488/1 "2019-05-30T08:47:37Z")

</div>

I have been developing an ingest plugin that connects to a remote server and gets from it the projection of the document of the form:

"vector": [  
0.0021645021645200296,  
0.0021645021645200296,  
0.0021645021645200296,  
0.0021645021645200296,  
0.0021645021645200296,  
0.0021645021645200296,  
0.0021645021645200296,  
0.0021862559551182196,  
0.0047532032457047735,  
0.0021645021645200296,  
0.0021645021645200296,  
0.0021645021645200296,  
0.0021645021645200296,  
0.002186255955118221,  
0.0021645021645200296,  
0.0021645021645200296,  
0.0021862559551182196,  
0.0022080097457164096,  
0.0021645021645200296,  
]

I parse it to a double array in java, but when indexing it the following error arises:

\<  
1\> "type" : "illegal\_argument\_exception",  
1\> "reason" : "unexpected value type [class [D]",  
1\> "stack\_trace" : "java.lang.IllegalArgumentException: unexpected value type [class [D]  
/\>

Is there any way I can index numerical arrays as a field?

Full code of the project: [https://github.com/bLozanoUPM/ingest-library](https://github.com/bLozanoUPM/ingest-library)

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [May 30, 2019, 6:58pm UTC](https://discuss.elastic.co/t/elasticsearch-custom-ingest-plugin-error-when-indexing-with-a-field-of-type-doble/183488/2 "2019-05-30T18:58:38Z")

</div>

It looks like you are passing a `double[]`. I'm not sure the ingest document class knows how to handle that. In general it expects something serializable back to json, so I would try `List<Double>` instead.

---

<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, 2019, 6:58pm UTC](https://discuss.elastic.co/t/elasticsearch-custom-ingest-plugin-error-when-indexing-with-a-field-of-type-doble/183488/3 "2019-06-27T18:58:43Z")

</div>

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