File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1223,6 +1223,19 @@ export class NextDrupal extends NextDrupalBase {
12231223 * @param {string } name The name of the search index.
12241224 * @param {JsonApiOptions & JsonApiWithNextFetchOptions } options Options for the request.
12251225 * @returns {Promise<T> } The fetched search index.
1226+ * @requires JSON:API Search API module
1227+ * @example
1228+ * Get search results from an index named `articles`
1229+ * ```ts
1230+ * const results = await drupal.getSearchIndex("articles")
1231+ * ```
1232+ *
1233+ * Using TypeScript with DrupalNode for a node entity type
1234+ * ```ts
1235+ * import { DrupalNode } from "next-drupal"
1236+ *
1237+ * const results = await drupal.getSearchIndex<DrupalNode>("articles")
1238+ * ```
12261239 */
12271240 async getSearchIndex < T = JsonApiResource [ ] > (
12281241 name : string ,
You can’t perform that action at this time.
0 commit comments