kiwix-tools icon indicating copy to clipboard operation
kiwix-tools copied to clipboard

Empty pattern for a fulltext search should not generate an error

Open kelson42 opened this issue 1 year ago • 2 comments

If I just click ENTER with no search pattern I get this

Image

I expect that:

  • If there is no pattern at all, not search is started, nothing happens
  • If there is someone arriving just on this URL, then we should display no results, but this is not an invalid request.

kelson42 avatar Apr 06 '25 16:04 kelson42

Hi,@kelson42 I’d like to work on this issue. I see that when the pattern query param is empty, the backend returns Invalid request. My plan is: Add a frontend check to avoid sending a search request if the pattern is empty. Update the backend search handler to return a valid response (e.g., empty result set or default view) instead of an error when pattern is empty. This will prevent the error from showing and make the search experience smoother. Does this approach sound good?

DeveshPatill avatar Aug 09 '25 06:08 DeveshPatill

Hi @kelson42, I'm Filippo Taddei.
I’d like to work on this issue. Could you please confirm if it is still available? Thank you!

pippotadde avatar Dec 04 '25 23:12 pippotadde