-
Notifications
You must be signed in to change notification settings - Fork 94
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
Use a tokenizing filter #117
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/downforacross/downforacrosscom/795gaqo9x |
Love this, fully support the idea! You should be able to test this without running a local backend, since filtering is done client-side. You can also test on the autodeploy links posted by vercel: https://downforacrosscom-git-fork-tmiguelt-token-search.downforacross1.vercel.app. |
I tried that, but as in the other issue, I'm not able to actually upload puzzles to the site. And the puzzle list is empty, so I can't really test out this behaviour. |
And... now they're all visible. I have no idea what was going on there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
I suppose there's some argument for supporting search quotes, such that "LA Times" will only return that substring, and not "la" somewhere in the text and "times" somewhere in the text. But it depends on how you want the search to work: as a Google-esque plaintext search that implements features via search syntax, or as a kind of form with lots of fields that you can tweak. This question also matters for the other thing search is missing: searching by date. Under the plaintext system you might type |
Yeah, I like the idea of coming up with a more powerful syntax -- something like gmail's operators. Another extension would be to hold the filter state (the Size / Status checkboxes) in the search bar itself, so checking & unchecking would just insert/delete search terms. Another extension would be to persist search state in the url bar, so you can bookmark URLS like "Unsolved Monday Puzzles". |
That all seems quite doable. I wonder if there's a React or vanilla JS library that provides a framework for implementing an operator search like this. I can't find one, but admittedly it wouldn't be so hard to do manually. |
Instead of the current (confusing) filter behaviour, we instead:
Then, each token must be present within the (lowercase) author name, or puzzle title or it is filtered out.
This is a draft PR until I can actually test it (see #116)
Closes #92.