find_note returns duplicate

arthur's Avatar


17 May, 2020 02:20 AM

There have been a different when going from anki/ to rslib/src/search/ , the method does not use "distinct" in the query anymore, and so it returns each note id as many time as they are card. This did not exactly create a problem to my add-ons, simply, it made one slower.

Speaking of which, they was another trick you used for speed you didn't port and may want to consider in
If "n." does not occur in the sql query, then select only from cards and not from notes.
Reciprocally, in my add-on, selecting only on notes and not on cards would probably increase the speed too. If at some point you have time for this feature, I'd appreciate

  1. Support Staff 1 Posted by Damien Elmes on 18 May, 2020 07:15 AM

    Damien Elmes's Avatar

    This is partially done in the changes I pushed today:

    When I get a chance I'll add a separate search_cards_only and update the main functions to automatically select the faster path when possible.

  2. 2 Posted by arthur on 18 May, 2020 08:31 PM

    arthur's Avatar

    Thank you very much.

Comments are closed, but you can start a new discussion.

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