Skip to content

How does Fuse.js search work? Cannot search newly added file #716

Answered by razonyang
FuadEfendi asked this question in Q&A
Discussion options

You must be logged in to vote

In short.

  1. The theme generates the index.json which contains all pages, i.e. https://hbs.razonyang.com/v1/v1/en/search/index.json.
  2. The search page loads the index.json once per page load, parse the user input, then display the search result.

So, if you're adding new pages, you should reload the search page for reloading the index.json.
If it's still not working, please check whether your new pages are included in index.json.

Force refresh CTRL+F5 and restrart hugo server may ensure that is no cache.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by FuadEfendi
Comment options

You must be logged in to vote
2 replies
@FuadEfendi
Comment options

@razonyang
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants