Match annotation text and comments in All Fields & Tags mode

I think this was only in Everything for historical reasons -- in the
initial implementation of search modes, tags, notes, and (old)
annotations were all in Everything, but tags and notes were later moved
to All Fields & Tags. The old `annotation` condition wasn't moved, and
when I added `annotationComment` and `annotationText`, I just left them
in the same place. But if we match notes in All Fields & Tags, we should
match annotation comments, and if we're matching comments, we might as
well match annotation text as well.

https://forums.zotero.org/discussion/119123/note-annotations-zotero-search-and-zotero-pdf-viewer-search
This commit is contained in:
Dan Stillman 2024-10-26 02:17:40 -04:00
parent 88e10cdace
commit bb7a7ab961

View file

@ -328,13 +328,12 @@ Zotero.Search.prototype.addCondition = function (condition, operator, value, req
this.addCondition('field', operator, part.text, false);
this.addCondition('tag', operator, part.text, false);
this.addCondition('note', operator, part.text, false);
this.addCondition('annotationText', operator, part.text, false);
this.addCondition('annotationComment', operator, part.text, false);
}
this.addCondition('creator', operator, part.text, false);
if (condition == 'quicksearch-everything') {
this.addCondition('annotationText', operator, part.text, false);
this.addCondition('annotationComment', operator, part.text, false);
if (part.inQuotes) {
this.addCondition('fulltextContent', operator, part.text, false);
}