# BulkInsert fails with knn\_vector data type

**URL:** <https://discuss.elastic.co/t/bulkinsert-fails-with-knn-vector-data-type/352390>\
**Category:** Elasticsearch\
**Created:** [February 2, 2024, 11:58am UTC](https://discuss.elastic.co/t/bulkinsert-fails-with-knn-vector-data-type/352390 "2024-02-02T11:58:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CodeNinja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/codeninja/32/122070_2.png) [@CodeNinja](https://discuss.elastic.co/u/CodeNinja)\
**Post date:** [February 2, 2024, 11:58am UTC](https://discuss.elastic.co/t/bulkinsert-fails-with-knn-vector-data-type/352390/1 "2024-02-02T11:58:44Z")

</div>

Hello All,  
I am using BulkInsert (Java client) to ingest with an Index that has knn\_vector Data Type. Currently, I am able to ingest when I create `document` with a POJO Class object for every row that insert into Index. I am using List in the POJO for the "Embeddings" column values to work.

I just want to dynamically read from a file (with header) and ingest into Indexes. I tried with `Map<Object, Object>` to create the `document` but it complains for the "embeddings" column. I want to check if I have a way to ingest without pre-creating the POJO Class?

Ex: POJO class

```auto
@Builder
@Data
Class MoviesIndex {
private String movieName, 
private String movieGenre, 
.
.
private List<Float> embeddings;
.
}

```

---

<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:** [March 1, 2024, 11:59am UTC](https://discuss.elastic.co/t/bulkinsert-fails-with-knn-vector-data-type/352390/2 "2024-03-01T11:59:12Z")

</div>

Closed on March 1, 2024, 11:59am UTC

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