nextjs-starter-medusa: search page doesn't work with meili search
search page doesn’t work with meili search
⨯ src/app/[locale]/(main)/search/actions.ts (10:29) @ initIndex
⨯ TypeError: _lib_search_client__WEBPACK_IMPORTED_MODULE_2__.searchClient.initIndex is not a function
at search (search/actions.ts:17:80)
at StorePage (search/[query]/page.tsx:19:72)
at async Promise.all (index 0)
at async Promise.all (index 0)
at async Promise.all (index 0)
at async Promise.all (index 0)
at async Promise.all (index 0)
8 | */
9 | export async function search(query: string) {
> 10 | const index = searchClient.initIndex(SEARCH_INDEX_NAME)
| ^
11 | const { hits } = await index.search(query)
12 | return hits
13 | }
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Comments: 15 (7 by maintainers)
Thanks guys, I’ll look into this. The goal is to support both Algolia and MeiliSearch.