db.collection.getSearchIndexes() not work

Hi I am not able to run the db..getSearchIndexes(“default”) it says
TypeError: db.<>.getSearchIndexes is not a function
TypeError: db.assetItem.getSearchIndexes is not a function
if (_fs === “returned”) return _srv;else if (_fs === “threw”) throw _srv;
^

TypeError: db.assetItem.getSearchIndexes is not a function
at evalmachine.:34:196
at evalmachine.:48:5
at evalmachine.:53:3
at Script.runInContext (vm.js:143:18)
at Object.runInContext (vm.js:294:6)

Hi @VIKASH_RANJAN1,

How are you running the command? From mongosh or through a driver?

If through a driver, then please take a look at the $listSearchIndexes documentation.

Regards,
Jason

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