Dense vector doesn't support synthetic source

According to this: Dense vector field type | Elasticsearch Guide [8.5] | Elastic
dense_vector field is supposed to support synthetic source.
I just tried to create an index with the mapping like this:

"mappings": {
        "_source": {"mode": "synthetic"},
        "title_vector": {
                "type": "dense_vector",
                "dims": 1024,
                "index": true,
                "similarity": "dot_product"

and got an error:

    "error": {
        "root_cause": [
                "type": "illegal_argument_exception",
                "reason": "field [title_vector] of type [dense_vector] doesn't support synthetic source"
        "type": "illegal_argument_exception",
        "reason": "field [title_vector] of type [dense_vector] doesn't support synthetic source"
    "status": 400

So does dense_vector support synthetic source or not?

Which version of Elasticsearch are you running?

"version": {
        "number": "8.4.1",
        "build_flavor": "default",
        "build_type": "docker",
        "build_hash": "2bd229c8e56650b42e40992322a76e7914258f0c",
        "build_date": "2022-08-26T12:11:43.232597118Z",
        "build_snapshot": false,
        "lucene_version": "9.3.0",
        "minimum_wire_compatibility_version": "7.17.0",
        "minimum_index_compatibility_version": "7.0.0"

Yes, it looks like 8.4 does not support dense_vector with synthetic source:

Exactly. It is important to always look at the correct version of the docs, especially for new and evolving features.

1 Like

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