Zotero 7: Unintuitive annotation search results

edited January 7, 2024
Would someone be able to explain the annotation search behavior that I'm experiencing?

1. Highlight some text, and add the comment "Alternating" (without the quotes).
2. Open the side bar, and in the "Search Annotations" field type "alternative" (without the quotes).
3. Notice that the annotation from step 1 matches the search pattern.
4. Modify the search pattern to be "alternatives" (without the quotes).
5. Notice that the annotation from step 1 does not match the new search pattern.

Is there a reason why the annotation comment "Alternating" would match the search pattern "alternative", but not match "alternatives"?

This is using version 7.0.0-beta.54+6b996d4f9 (64-bit) on Linux.
  • I've found some similar results in which the search has matched some unexpected terms. I assume that this is a result of matching that is tolerant to some amount of misspelling (which I think is generally not a bad idea). In your example I would assume that "alternative" is a closer match to "alternating" (two differing letters) than "alternatives" (three differing letters).
  • Since text extracted from PDF files may not always match what's visible on the PDF page, the Zotero reader performs approximate matching (Levenshtein distance) of the typed phrase.

    If you believe this approach is more problematic than beneficial, please let us know, and we can consider improving this.
  • Thanks, that makes sense.
  • I have to admit that after using the beta for longer, I do find the search behaviour a tiny bit irritating. The amount of false matches is often higher than that of real matches; for example searching for "mother" also matches "other", "brothers", "others". However searching "movement" does not match "move- ment", even though the latter type of misspelled words is much more common for me (https://forums.zotero.org/discussion/107676/z7-beta-line-breaks-in-annotation) than wrong OCR.

    I don't know what a good solution would be - maybe excluding correctly spelled words from the matching algorithm? Possibly highlighting the matched terms in the annotations would already be helpful in figuring out why a given annotation was matched. Another helpful addition could be a clearer indication - like a horizontal line - of where the non-exact matches start appearing.
  • @samvimes We'll try to improve the search. Thanks for the feedback.
Sign In or Register to comment.