Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update model.js
  • Loading branch information
IslandRhythms committed Apr 10, 2024
commit d5d1ad8f77cf71f819288b188bd5c0b6b6731f1d
9 changes: 9 additions & 0 deletions lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -1655,6 +1655,15 @@ Model.dropSearchIndex = async function dropSearchIndex(name) {
return await this.$__collection.dropSearchIndex(name);
};


Model.listSearchIndexes = async function listSearchIndexes() {
_checkContext(this, 'listSearchIndexes');

const cursor = await this.$__collection.listSearchIndexes();

return await cursor.toArray();
}

/**
* Does a dry-run of `Model.syncIndexes()`, returning the indexes that `syncIndexes()` would drop and create if you were to run `syncIndexes()`.
*
Expand Down