"mappings": {

    "properties": {

        "nominee_text": {"type": "text"},

        "nominee_vector": {

            "type": "knn_vector",

            "dimension": 4096,

            "method": {

                "engine": "nmslib",

                "space_type": "cosinesimil",

                "name": "hnsw",

                "parameters": {"ef_construction": 512, "m": 16},

            },

        },

    }

},

"settings": {

    "index": {

        "number_of_shards": 2,

        "knn.algo_param": {"ef_search": 512},

        "knn": True,

    }

},

} Any solution?

"mappings": {

    "properties": {

        "nominee_text": {"type": "text"},

        "nominee_vector": {

            "type": "knn_vector",

            "dimension": 4096,

            "method": {

                "engine": "nmslib",

                "space_type": "cosinesimil",

                "name": "hnsw",

                "parameters": {"ef_construction": 512, "m": 16},

            },

        },

    }

},

"settings": {

    "index": {

        "number_of_shards": 2,

        "knn.algo_param": {"ef_search": 512},

        "knn": True,

    }

},

} Error:

RequestError: RequestError(400, 'mapper_parsing_exception', "failed to parse field [nominee_vector] of type [knn_vector] in document with id '55nxY40Bdoi9X56tiIna'. Preview of field's value: 'null'")

Any solution for the above mentioned problem?

I tried to store my embedding and text to opensearchserverless collection by using this index. But getting this error everytimes

1

There are 1 best solutions below

0
On

These kind of error usually occurs from the mismatch of vector dimension. You should find out the dimension length, and configure when you create the OpenSearch index. I hope it helps you.