Feature Request Filtered Decks - automatic rebuild

Could the filtered decks, when opened, automatically rebuild themselves? I do this 999 of 1000 times I open those decks, both desktop and in iOS. Also, if I forget to do it, then I might study a stale filtered deck.

I doubt it’s a performance issue, the database is wicked fast when doing rebuilds, but if so then as an opt-in option?

2 Likes

What if this is an opt-in? Usually filtered decks are assumed to be updating, that’s how they work with other apps where a filtered view is available?

They are not a simple ephemeral filter; they modify any cards they pull in or return, and if the matched cards have not changed, it still marks everything in the deck as modified, since they get removed and then re-added. Your use case may include only a few ten or hundred cards, but if the feature is there, I think there’s a good chance there’ll be users rebuilding thousands of cards each day, leading to sync conflicts and excess sync traffic.

Well, OK. It’ just the assumed behavior of smart folders in OS file systems apps, Photo apps and so on, i.e. the rule for creating the content is re-run when opening, or even while it’s open and events come in changing the set.

Is this the case for these read-only queries, that they also modify the database? I would also think that anyone making bad filtered decks and hitting rebuild over and over will trigger the same issues compared with this done when opening the filtered deck.

Manually building filtered decks will likewise cause cards to be marked as modified, but it’s less likely to cause problems, as it requires an explicit action by the user.

I’m not sure a live-updating search makes sense for Anki, as once cards have been pulled into a filtered deck the user may want to study them more than once before they leave again.

Hmm, sounds like just adding cards to a filtered deck causes them to be modified. Now, if an end user has big filtered decks and hits rebuild over and over, it’s the same problem anyway.

Just now I rebuild every time I use a filtered deck, don’t even know if not rebuilding would make sense as filtered decks should reflect the current state of the course material.

@dae is there a reason that moving cards to a filtered deck needs to mark them as modified? Is there a way to make it so it doesn’t mark them as modified?

A card stores the id of the deck it’s in. Consequentially, when the deck changes, the card is modified and the modification has to be synced.

Maybe there is another angle to your problem: A lot of users use filtered decks for their regular study but presumably, filtered decks weren’t designed with that use case in mind. Maybe the reason why they are used like that in the first place is missing functionality for regular decks and can be resolved by implementing these missing features. Full randomisation is a well known example for this.

1 Like

Yes, for example if the filtered output generates a real deck, that would be fine, too. But the beauty with filtered decks/auto folders et rest is the dynamic nature where when opening such a thing, it reflects updated values in the database (or file system).

I assume this all has to do with the architectural 1:1 of one deck per card and filtered decks bypass that.

If moving into/out of a filtered deck did not mark the card modified, the changes would not sync to your other devices, so you’d end up with the cards in different locations on different devices, which is confusing.

Sounds like we need a ‘filtered deck’ state in the filtered deck itself that tells to copy all cards inside the filtered deck, or update, on the devices connected to the specific account.

I’m using a filtered deck out of a huge deck now daily for pulling cards which I prefer, by tag, on a daily routine.

So I was also wondering if automatically building the deck would improve the situation. I’m glad I found the thread and also find that the sync issue is real, and working around that would further complicate configuration.

Just one more question. When rebuilding, I think I don’t have to empty the filtered deck, right? I wouldn’t use the cards anywhere else, i.e, in its original or another filtered deck.

Rebuilding empties the deck before it builds it again, so it modifies all cards in it.

1 Like