Add an error message if the search query is invalid - FSRS optimization

Currently, it is impossible to get an error message if your query is incorrect, or at least I wasn’t able to. This can lead to situations like this: Why can't I optmize my FSRS parameters?

That user entered preset: "Padrão", with an extra space, and that’s why the optimizer didn’t work. However, the user was not notified that something’s wrong. Which is wrong.

Good solution: Microsoft Word-style underlining with a suggested correction. For example, in this case Anki would underline preset: "Padrão" and a small window would pop up, saying “Did you mean preset:"Padrão"?”.

Mediocre solution: an error message that says “Invalid search query”. The user will be confused and will have to do some research to figure out how to use the search field correctly.

Terrible solution: the current implementation. The user won’t know that he made a mistake until another users points it out.

@dae @L.M.Sherlock I believe this is a major design flaw and should be fairly high on your priority list

1 Like

I suggest adding quick access to the query result as in filtered decks.

It is also possible to reset this parameter. After all, this is the first thing the user should have done when he made a mistake.

Another solution would be a pop-up window with ready-made search queries in the form of user presets, in a similar way ANKI does when it is necessary to enter the name of the deck.
Снимок экрана 2024-04-24 165516

Снимок экрана 2024-04-24 165441

1 Like

The problem is – that’s not an invalid search query, so there would be nothing to trigger either of those things. It surely wasn’t what the user wanted to be searching for, but it’s structured correctly [cards (belonging to notes) containing the word “Padrão” in decks where the preset is blank]. The error that was returned was correct for that search – 0 reviews found. [I believe that search will always be empty, because decks will always have a preset.]

I would think the error could have easily been caused by autocorrect typing. If the user retypes the default text exactly as displayed, and the name of the preset is a word in their dictionary – autocorrect on a mobile keyboard is likely to put a space after the colon. So even if the user goes back and puts quotes around the name (which are unnecessary when the name is a single word), the space will remain.
image

I’d suggest instead that the default text could be changed to put the quotes around the entire search term. That will signal to users (who might be inexperienced with search in Anki) that the syntax is important.
"preset:Default" -is:suspended


[Side note: I know that an unnecessary leading space isn’t a problem when searching for a deck: by name, but it appears to be a problem when searching for a preset by name. Is that difference intended?

Ex. deck:Default and "deck: Default" return the same result. preset:Default and "preset: Default" do not.]

1 Like