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

Search not working? #122

Open
apiening opened this issue May 26, 2023 · 2 comments
Open

Search not working? #122

apiening opened this issue May 26, 2023 · 2 comments

Comments

@apiening
Copy link

I have deployed a test instance with docker-compose based on this example: https://linbreux.github.io/wikmd/installation/docker.html#docker-compose-recommended-click-here-for-more-info

I have copied a few .md files in the wiki folder and they're displayed correctly.
However, the search always reports Found 0 result(s) for '<keyword>' when I search for words that are included in my markdown files.

Is there anything required to enable searching? How is it even implemented? Is it index based and I need to trigger a reindex?

Btw.: I just found this project via google and it looks very nice!

@Linbreux
Copy link
Owner

@apiening that's weird... Normally the indexing is triggered automatically. You can try to edit in the browser and save your file again there. I'll check it this week. Does an other docker tag work?

@chrsbats
Copy link

chrsbats commented Nov 8, 2023

I did a regular install and ran into the same issue. I am using WSL2 / Ubuntu. The issue is that Watchdog relies on inotify and if you are using WSL2 or Docker on Windows it won't work unless you put your files on the Linux filesystem.

A quick but slightly suboptimal fix is to go into search.py and change Observer() to

    def watchdog(self):
        #observer = Observer()
        from watchdog.observers.polling import PollingObserver
        observer = PollingObserver() 

Maybe we could specify whether to use a PollingObserver option via the wiki config?

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

No branches or pull requests

3 participants