Can't create Atlas Search index through the API

Hi! I have a test database in a MongoDB Atlas cluster (version 6.0.6) with a collection with a few documents in it. I’m trying to create an Atlas Search index through the Create One Atlas Search Index endpoint, from which I receive a response with a 200 status code and a payload with the status set to IN_PROGRESS (plus correct collectionName and database).

After that, I start polling the endpoint to Return One Atlas Search Index, using the indexID I received in the creation response. This endpoint responds a few times as well with a 200 status code and a payload with the status set to IN_PROGRESS. After a few seconds, the endpoint responds with a 404 status code, with no details in the response about what happened to the index.

I have checked the primary server logs and there’s absolutely no mention about any part of the activity described above.

It may be worth mentioning that I have been able to successfully create an Atlas Search index for the same database from the Atlas UI.

Could someone please provide some advice on how to keep troubleshooting this issue? I’ve already talked with the chat support in Atlas, but they weren’t able to provide an answer.

Hi @Miguel_Igarzabal , can you provide the index definition that you are trying to create? Have you reviewed the FAQ: Why is my search index disappearing?

Hi amyjian, I realized what I was doing wrong, I was using the wrong cluster name in the API endpoint… sorry for the noise and thanks for you answer.

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