Filtered Decks and Object IDs

Hi Damien,

in the section about searching, the manual states:

Object IDs will not work in the mobile clients, and are not intended to be used in filtered decks at the moment.

Now I just read that sentence in the manual this morning. I use filtered decks in an add-on and I used the cid:xxxx search to programmatically build a filtered deck with an exact selection of cards, like cid:12345 or cid:6789 or .... And it seemed to work fine up to now.
So my question is: Are there plans to disable that functionality? I don’t really want to keep the code that way if it might stop working on any future Anki update, but I don’t know of any other elegant way to build a filtered deck with a specific set of cards… (I could maybe give all these cards some temporary tag and search by that, but that would be rather cumbersome I guess).

The search field was intended to be input by the user, not an automatically generated list of card IDs hundreds or thousands of kilobytes long, which is difficult for the user to edit, and slower to parse and sync. I’d recommend you use a card flag or a tag instead.

1 Like

Well, I should add that the amount of cards that go into a deck this way is in the range of 1 to 20 cards most of the time, but of course it is not really what the search field is for, you are absolutely right. I haven’t thought of flags at all, thanks, I will see if I can use those.

I can’t imagine 20 cards will become an issue, but if the search text goes into the tens or hundreds of kilobytes, it may butt up against a future limit. The text about object IDs not working in the mobile clients is out of date - AnkiMobile supports these searches, and I presume AnkiDroid does too.