Skip to content

Commit d90e15b

Browse files
committed
Add an API to get raw index
1 parent c20e20c commit d90e15b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/lib/meilisearch.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ class MeiliSearch {
5252
return new Index<T>(this.config, indexUid).fetchInfo()
5353
}
5454

55+
/**
56+
* Gather information about an index by calling MeiliSearch and
57+
* return the raw JSON response
58+
* @memberof MeiliSearch
59+
* @method getRawIndex
60+
*/
61+
async getRawIndex(indexUid: string): Promise<IndexResponse> {
62+
return new Index(this.config, indexUid).getRawInfo()
63+
}
64+
5565
/**
5666
* Get an index or create it if it does not exist
5767
* @memberof MeiliSearch

0 commit comments

Comments
 (0)