Make Browser Search Find De-Clozed Text

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I have an issue when […]

I have a collection of Cloze cards for learning the spelling of words. An example for “mnemonic” in the

(A) {{c1::mn}}{{c2::e}}monic (is a trick for remembering something.)

My problem is that searching for the “mnemonic” card in the card browser is tricky due to the cloze deletions in the middle of the word. Simply searching for “mnemonic” does not find the card.


As a workaround, I have tried adding the un-clozed name into a hidden field, but this is a hassle to do, and I don’t do it consistently. As I result, I often can’t tell if I already have a card for a given word and end up creating duplicates.

I expect that the need to use an un-clozed search text to search through cloze cards is not uncommon. In fact, I would always rather have search results based on the un-clozed versions of the cards.

My suggestion is one of the following:

  1. For the purposes of searching, remove all of the cloze tags from cloze cards. Thus, (A) {{c1::mn}}{{c2::e}}monic (is a trick for remembering something.) would treated as (A) mnemonic (is a trick for remembering something.).
  2. Combine Item 1. with the existing behavior, so a search would match against both the clozed and unclozed text.
5 Likes

Your suggestion is a great idea. For the timebeing, you could use some HTML trickery to get around this by adding the word which is in cloze like so (it’s only a workaround until it gets implemented, if it does)

<span style="display: none;">mnemonic</span>

This will allow you to see the cards which have the word mnemonic in it, but will not display this as a part of the content of the card.

2 Likes

Sounds like a useful feature to have for sure, one that can be implemented in the same way as the “ignore accents in search” setting, but it’d require adding a toggle to the settings page for the same reason: it’d make searching slower

@dae thoughts?

2 Likes

I’ve done something similar where I have a field in the card template that is not displayed on the card.

2 Likes