Closed nilshoerrmann closed 3 years ago
I get your point - I'm just very unsure about the implementation yet.
Adding a check in the backend on every search action could be a performance hit. Auto-generating the index might be problematic with very big indexes. People would think it's broken cause nothing is happening. I feel like generating should be a deliberate action (when generating the whole index, incremental changes via hooks seem fine to me).
Showing feedback in the Panel could be fine... Just not a 100% sure yet if there is an easy way for the Panel to recognize when no index has been created yet vs. the search really having no results.
One clear improvement should be to include something in the installation section of the docs (so it's not as easily overlooked)
I agree, that auto-generating the index might not be a good idea. There are two approaches that come to my mind:
With "reacting to the error" I mean something like displaying a message in the search result list or displaying a pop-up. In both cases, I'd like to get informed that the search has not been configured correctly. If I'm an admin, I'd like to see something like this:
The search has not been configured correctly. Please [check out the documentation](link/to/docs) for further information.
[ re-index site ] [ OK ]
If I'm a normal user something more abstract would be fine, in order for me to know I should contact an admin:
Your search could not be performed due to an internal error.
[ OK ]
These are of course just ideas, but currently the UI doesn't reflect a misconfiguration at all. There is just nothing happening at all. And that's what I'd like to see changed. So in the end, maybe this issue is about handling exceptions in the broader sense, not just missing indexes. 🤔
One clear improvement should be to include something in the installation section of the docs (so it's not as easily overlooked)
That's a good idea because this plugin offers so many options that you can get lost a bit 😊
✅
Great, thanks!
After installing the plugin the default SQLite database is created inside the
media
folder. As the database is still empty, the search will not work and throw errors in the console complaining about missing models. Of course, this happens because I didn't read the docs until the end and didn't notice there was more for me to do, but one of the following would be nice: