Implented Search for Notes#27
Conversation
|
The prototype looks nice. Any idea why the BTW, did you checkout LunrJS which generates an index file automatically? |
|
Lunr.js still says to build an Index for static sites
Rather than using Lunr to build the index, it's easier to create an Index at Build time and is the easier option, so I went for it
This is because no tags are given with the post. I will add a conditional clause to check if any tags are present or not |
Added a condition to check if tags are present or not, added a condition to skip adding index page to SearchIndex
|
Hey @mr-karan updated the code. The update code's demo can be found in https://zettel-search.surge.sh/ (the same url) |
|
@athul Thanks. Went through the changes and the code. I don't think this is a FTS and there are some errors in the search result: Moreover, we can't search based on any word, it seems to only work for the headings. Is that how it's intended? |
|
The Body is not indexed(higher than 20kb search.json file) , thus yes, It isn't a FTS. Fuze.js is a fuzzy search package, if it finds anything similar to the keyword, it will respond with a result.
The Indexed things are titles and tags and these are used as the search keys |
|
May be we can give an option to the user to include the content as well? |


I have been working on the Search implementation. I had to generate an Index File with the title and tags as JSON and use that with some Client Side JS to make it working. I have deployed the docs of zettel wrt this PR. You can find it here 👉 https://zettel-search.surge.sh/
Do provide feedback on where it could be changed or not