How to drop (delete, remove) a Mongo Atlas full-text search index on a collection?

How to drop (delete, remove) a Mongo Atlas full-text search index on a collection?


Please check this

From command line
Identify your index name

1 Like

That doesn’t work for Mongo Atlas full-text search indexes. Just regular indexes and text indexes.

All I get is…
[ { “v” : 2, “key” : { “_id” : 1 }, “name” : “id” } ]

So I am in a state where I have no idea where these indexes are, how to list them, nor how to drop them.

So you are able to create FTS index but cannot drop?
How did you create? Was it dynamic (default) or static
From where you got above details
What is your cluster type M0,M10…etc
You should be having edit index button

I created the FTS index in the UI.
There is apparently no way to create it through an api.
I did find the delete button in the UI.
There is no programmatic way to list or manage these FTS indexes, or know where they are; nor is there a list in the UI, so I had to click through all my collections to see which ones had an FTS index, then take notes in a separate file so I can keep track of what indexes are where since there is no apparent way in the Atlas UI to do that.

I think you have to use API http get method to get those details

Hi @Melody_Maker,

As @Ramachandra_Tummala noted there are Atlas Search API methods that allow you to get details for (and manipulate) Atlas Search indexes. The API includes methods to Create an Atlas Search Index and Delete an Atlas Search Index.

You can also perform the same actions through the Atlas Search UI. See Delete an Atlas Search Index for the specific steps.

It sounds like the UI could be more intuitive. If you have suggestions for improvement, please create a topic on the MongoDB Feedback Engine and comment here with the link so others can watch & upvote.

A related feedback idea that you may be interested in is: Allow managing Atlas Search index via drivers.


1 Like

Thanks for the help guys.
I got it running in node.js
Here’s the code if anyone’s interested:
(refactored this way because I have the two funcs in separate files for reuse)

import DigestFetch from "digest-fetch";

do an ajax fetch using Digest Authentication

npm i digest-fetch crypto-js node-fetch

@param {string} publicKey
@param {string} privateKey
@param {string} url
@return {Promise<object[]>}
const fetchDigest = async (publicKey, privateKey, url) => {
  const client = new DigestFetch(publicKey, privateKey, {});
  const res = await client.fetch(url, {});
  return await res.json();

make a request to the Mongo API using Digest Authentication

@param {string} url
@return {Promise<object[]>}
const mongoApiRequest = async urlSegment => {
  const urlbase = ""; 
  return await fetchDigest(
    urlbase + urlSegment);

 // get the Mongodb full-text index info for a particular collection