Search isn't finding all the notes that contain my search term

Taylor Christensen's Avatar

Taylor Christensen

14 Sep, 2013 07:00 PM

I think I might know why it's doing this--it's searching html instead of what the user sees. So, if I've bolded only part of a word (which I do often to highlight the part of the word that's being used as part of a mnemonic), that note won't be included in the search results unless I only search for the unbolded or bolded part of the word.

For example, I searched "neonat" to pull up any notes that include the word neonatal or neonates. Then when I searched "eonat" it added a note to the results. The first letter of the word "neonate" was bolded in the new note it found.

I checked, and the Anki iPhone app also has this problem.

  1. 1 Posted by itraveller on 14 Sep, 2013 08:00 PM

    itraveller's Avatar

    This is not a mistake but a planned behavior in order to optimize the search process.
    Quote from the manual:

    Anki is only able to search within formatting in the sort field
    you’ve configured. For example, if you add "<b>exa</b>mple"
    to one of your fields, this will not be matched when searching
    for "example" unless that field is the sort field.
  2. 2 Posted by Taylor Christen... on 16 Sep, 2013 01:58 PM

    Taylor Christensen's Avatar

    I missed seeing that in the manual, thank you. FWIW, I'd rather my searches take a little longer but actually pull up all the cards that contain my search term.

  3. 3 Posted by Soren Bjornstad on 16 Sep, 2013 08:39 PM

    Soren Bjornstad's Avatar

    It's not a small optimization -- the alternatives are having to cache a
    text-only version of every field (which Anki 1 was capable of doing, but
    used a large amount of extra disk space) or strip all HTML from every field
    on every possible card on every search.

  4. Soren Bjornstad closed this discussion on 05 Oct, 2013 03:50 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac