How to create a collection specific search index in Atlas mongoDB?

463 Views Asked by At

I am trying to create a collection specific search index in the atlas MongoDB but not able to find a way.

Found this documentation: https://docs.atlas.mongodb.com/reference/api/atlas-search/#atlas-search-api-ref

but the API they mentioned will create indexed on cluster level

/groups/{GROUP-ID}/clusters/{CLUSTER-NAME}/fts/indexes/

Can someone guide me on how I will create a collection specific search index via script?

1

There are 1 best solutions below

0
On

When you use the api endpoint you must provide the collection name.