Fix [Attachment Content] [does not contain] searches in "all" mode
This commit is contained in:
parent
62bc5830eb
commit
1d4a6b0848
|
@ -716,7 +716,8 @@ Zotero.Search.prototype.search = function(asTempTable){
|
||||||
// (a separate fulltext word search filtered by fulltext content)
|
// (a separate fulltext word search filtered by fulltext content)
|
||||||
for each(var condition in this._conditions){
|
for each(var condition in this._conditions){
|
||||||
if (condition['condition']=='fulltextContent'){
|
if (condition['condition']=='fulltextContent'){
|
||||||
var filter = function(val, index, array) {
|
var fulltextWordIntersectionFilter = function (val, index, array) !!hash[val]
|
||||||
|
var fulltextWordIntersectionConditionFilter = function(val, index, array) {
|
||||||
return hash[val] ?
|
return hash[val] ?
|
||||||
(condition.operator == 'contains') :
|
(condition.operator == 'contains') :
|
||||||
(condition.operator == 'doesNotContain');
|
(condition.operator == 'doesNotContain');
|
||||||
|
@ -789,7 +790,7 @@ Zotero.Search.prototype.search = function(asTempTable){
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ids) {
|
if (ids) {
|
||||||
var scopeIDs = ids.filter(filter);
|
var scopeIDs = ids.filter(fulltextWordIntersectionFilter);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var scopeIDs = [];
|
var scopeIDs = [];
|
||||||
|
@ -811,7 +812,7 @@ Zotero.Search.prototype.search = function(asTempTable){
|
||||||
hash[val.id] = true;
|
hash[val.id] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
filteredIDs = scopeIDs.filter(filter);
|
filteredIDs = scopeIDs.filter(fulltextWordIntersectionConditionFilter);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var filteredIDs = [];
|
var filteredIDs = [];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user