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
asked 7 months ago101 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions