Dense_vector type changes to “float” after loading the data

I'm trying to load vector_value into Elasticsearch,
index creation and data loading finished without any error.
But the result of mapping shows type "float", not "dense_vector".
The version of Elasticsearch is 7.4.3.

You need to specify the mapping through an index template or when you create the index. Dense vector fileds will not be identified as such through dynamic mapping.

This is very old and has been EOL a long time. A lot of improvements have been made in the vector area so I would recommend up upgrade to the latest version as a matter of urgency.

FYI, newer versions of Elasticsearch (8.11.0+) will dynamically map dense vector fields for float arrays of sizes >= 128. Earlier versions do have to have explicit mappings.

1 Like

Yes we do provide mapping when we create the index; still in some cases it maps them as float vector.

Are you providing the mappings through an index template so you are sire they are applied before data is added?

Yes, mappings are provided using an index template and are applied before indexing the data. We saw this is happening only in one of the environment. rest other environments are working fine.

Deleting and recreating index fixed this issue but would like to know what can cause this type of issue and what is the recommended way to prevent it.

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