"Default browser search" to current card/note only?

Hello,
I am using Anki 2.1.49.

Is there a way to set “Default search text” (preferences), so that the default browser search opens the current card/note only? I tried to, but couldn’t think of any keyword.

Thank you in advance,
jcznk

(I liked the old behavior: “B → current card/note; enter → current deck” a lot, as it was very simple and convenient.
The current “B → current deck, focus on current card/note” is ok, but it becomes quite cumbersome when the current deck has a lot of cards.
For example: my main deck contains >100k cards; with the old behavior it took less than a second to open the browser from the reviewer, now it takes about 5-6 seconds each time, which quickly adds up.
It would be a good compromise if there was the option to only look for the current card/note, even if meant not being able to then click “enter” to search the current deck, having to rely on the lateral toolbar to do so)

Since you mention B > current card/note, I assume that you want this behavior when you are reviewing cards. In this case, if you really are only interested in the current card, you can press E, which will edit the current card, and not open the browser.

1 Like

Well, I know of the E shortcut, but thank you.
Maybe I should have only talked about “current note”, as that would be my much-preferred option.

My use case is this: having a large deck, opening the browser from the reviewer is quite time consuming with the current default settings, as >100k cards have to be loaded each time.
I use a deck which contains only 1 card as the default search, but that is a workaround.
I would rather go back to the way Anki behaved before, or at least being able to set the default search to the current note only. This way, it would still be lightweight, while also being relevant to my current work.

If my impression is correct, leaving “Default search text” empty is the exact same as setting it to “deck:current”, while there is no option to set it to “current note”, as there is no search term for it. Couldn’t it be better if the opposite was true? That is to say, leaving it empty = current note, and if you do not like that you can always go to the preferences, type “deck:current” and change it.

I don’t understand then, E exactly allows you to edit the current note. What’s wrong with it?

When I open the browser from the reviewer it’s not always because I want to edit current note fields’ contents.
A. Sometimes I just want to search something, often unrelated.
B. Other times I want to check/change a card’s deck, or to check/change the due date or state of its siblings (suspended/unsuspended/flagged). And so on.

Being able to have “current note only” as the default browser search would be optimal for both use cases. As in use case A you just want the default search to be as quick and painless as possible, and in use case B this default search would bring you right where you want to be.

1 Like

I can see how such a feature would be useful to you, and I think it wouldn’t be too hard to implement, but here are a few alternatives and related points to consider, in addition to what @BlackBeans has already said:

  • 5-6 secs is a lot of time for the browser to open. My test collection with 1 million cards takes less than 3. Maybe you can disable some columns, or use notes mode to speed things up. There could also be an add-on that slows you down. And finally, 2.1.50 is three times as fast for me. :scream_cat: No idea why.
  • You could add additional constraints to the deck:current search.
  • It should be quite easy to create a “current note” search with an add-on.
1 Like

I don’t understand how can that be so slow. At worst, opening the browser should be one SQL query, isn’t it (in addition to the window creation, which should be negligible)? Maybe some profiling would be required?

It’s a lot more than one query. First you need all ids matching the search, afterwards you have to get the necessary data of every visible row and render it, and then there is the sidebar with its different sections.
As 2.1.50 is so much faster for some reason, looking into slowdowns on earlier versions doesn’t seem very rewarding.

1 Like

@dae @Rumo

I see that Anki’s default search (while reviewing) used to be “current card/note only”, even after “click enter to search current deck” was removed

Would it be possible to bring back such default behaviour? Or at least create a way to set it in the preferences?
Searching the whole deck every single time is very awkward. I tried Anki 2.1.50 and, while faster, it is not so much better for me under this regard.
As far as I’ve understood, the current default behaviour can be achieved by setting the preferences to “deck:current” (a bit redundant), so it would still be available to those that like it.

Thank you

Added to Possible improvements for browser startup on large decks · Issue #1744 · ankitects/anki · GitHub

1 Like