Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proper setting for searching with fuse? #977

Closed
xarthurx opened this issue Sep 11, 2023 · 8 comments · Fixed by #979
Closed

proper setting for searching with fuse? #977

xarthurx opened this issue Sep 11, 2023 · 8 comments · Fixed by #979

Comments

@xarthurx
Copy link

New to docus and realize that there're enough info for how to configure the search functionality.

In the documentation, only one line mentioned useFuse options, but I cannot find any example config files/settings in the app.config.ts.

How to activate the search / deactivate it?
My website have the button, but nothing shows up if I type any keyword.
image

(fuse.js is manually added to the dependencies)

@PGimenez
Copy link

I'm in the same boat. Search used to work but somehow it doesn't anymore (I'm on 1.14.6) as I'm getting the "No results found. Try another query" message

@nogic1008
Copy link

I also faced in this issue.
It was resolved by pinning @nuxt/content version to 2.7.2.

@Barbapapazes
Copy link
Contributor

Hello, could someone provide a minimal reproduction, so that, I'll take a look?

@evermake
Copy link

Hello, could someone provide a minimal reproduction, so that, I'll take a look?

Even in the clean starter template search doesn't work.

Created one (with pnpm), you can check it:

https://github.com/evermake/docus-tmp-repo

@Barbapapazes
Copy link
Contributor

@Barbapapazes
Copy link
Contributor

Barbapapazes commented Sep 17, 2023

I would love to debug this an create a PR to solve this issue but I'm unable to start this project on WSL.

More than 20 seconds to start Vite and Nitro never start. 😅

nuxt/nuxt#23257

@rgrativol
Copy link
Contributor

rgrativol commented Sep 20, 2023

The _empty field in the parsed content is returning undefined. Probably, something in nuxt content.
The easy fix is to check for it here like below and the search will work properly:

     // _empty can return undefined, so we need to check for that
     (doc?._empty === undefined || doc?._empty === false)

image

@Baroshem
Copy link

I experience exactly the same issue.

I have the documentation built using docus and the search does not work.

I am using Nuxt Content 2.8.2, docus 1.12.3.

The code can be checked here https://github.com/Baroshem/nuxt-security/tree/chore/1.0.0-rc.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants