You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use the search feature with any [Nuxt Content source](/api/configuration#sources). You can also enable or not the [document-driven feature](/guide/writing/document-driven).
20
+
::callout
21
+
You can use the search feature with any [Nuxt Content source](/get-started/configuration#sources). You can also enable or not the [document-driven feature](/document-driven/introduction).
21
22
::
22
23
23
24
## Search
24
25
25
-
You can use the `searchContent` composable to search in your `content` directory:
26
+
You can use the [`searchContent`](/composables/search-content) composable to search in your `content` directory:
By default, the `searchContent` composable will used an indexed search. This mean that the search will be faster and the API response smaller and optimized **only usable by [`miniSearch`](https://lucaong.github.io/minisearch/)**.
44
+
By default, the [`searchContent`](/composables/search-content) composable will used an indexed search. This mean that the search will be faster and the API response smaller and optimized **only usable by [`miniSearch`](https://lucaong.github.io/minisearch/)**.
44
45
45
-
::alert{type="info"}
46
+
::callout
46
47
Internally, the search feature, both `searchContent` and `/api/indexed-search.ts` endpoint, use [`miniSearch`](https://lucaong.github.io/minisearch/).
47
48
::
48
49
49
50
## Simple Search
50
51
51
52
If needed, you can disable the indexed search and use a simple search instead:
52
53
53
-
```js [nuxt.config.js]
54
+
```ts [nuxt.config.ts]
54
55
exportdefaultdefineNuxtConfig({
55
56
content: {
56
57
experimental: {
@@ -68,7 +69,7 @@ Remember that the simple search is **slower** and the API response **bigger**. Y
68
69
69
70
Using the simple search, aka non-indexed search, you can use the tool of your choice to search in the API response. For example, you can use [`fuse.js`](https://fusejs.io/) with the integration of [`@vueuse/integrations`](https://vueuse.org/integrations/useFuse/#usefuse):
0 commit comments