OpenSearch Serverless - Unable to create index mappings with Nested type

0

Hello, I am using OpenSearch Serverless as a vector datastore. While creating index mappings, I am unable to use {"type": "nested"} when I do index sorting while creating the index. I get the following error : Error: TypeError("Unable to serialize {'nested', 'type'} (type: <class 'set'>)"))

When I removed index sorting, I was able to create the "nested" type in index mappings. Any guidance on how to create index mapping with sorting when using 'nested' type? Thanks! Here is my index schema for reference:

Index_body = {'mappings': {'properties': {'acl_tags': {'nested', 'type'}, 'content_type': {'type': 'keyword'}, 'dataset_id': {'type': 'keyword'}, 'item_id': {'type': 'keyword'}, 'metadata': {'nested', 'type'}, 'source_type': {'type': 'keyword'}}}, 'settings': {'index': {'number_of_shards': 1, 'sort.field': 'item_id', 'sort.order': 'asc'}}}

Deepali
已提问 7 个月前104 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则