diff --git a/components/indexeddb-backbonejs-adapter/backbone-indexeddb.js b/components/indexeddb-backbonejs-adapter/backbone-indexeddb.js index 2a7e93b9..6a094d9e 100644 --- a/components/indexeddb-backbonejs-adapter/backbone-indexeddb.js +++ b/components/indexeddb-backbonejs-adapter/backbone-indexeddb.js @@ -421,13 +421,15 @@ }); } else if (options.index) { index = store.index(options.index.name); + var excludeLower = !!options.index.excludeLower; + var excludeUpper = !!options.index.excludeUpper; if (index) { if (options.index.lower && options.index.upper) { - bounds = IDBKeyRange.bound(options.index.lower, options.index.upper); + bounds = IDBKeyRange.bound(options.index.lower, options.index.upper, excludeLower, excludeUpper); } else if (options.index.lower) { - bounds = IDBKeyRange.lowerBound(options.index.lower); + bounds = IDBKeyRange.lowerBound(options.index.lower, excludeLower); } else if (options.index.upper) { - bounds = IDBKeyRange.upperBound(options.index.upper); + bounds = IDBKeyRange.upperBound(options.index.upper, excludeUpper); } else if (options.index.only) { bounds = IDBKeyRange.only(options.index.only); } diff --git a/js/components.js b/js/components.js index f2188b02..29ce1cc2 100644 --- a/js/components.js +++ b/js/components.js @@ -21779,13 +21779,15 @@ return jQuery; }); } else if (options.index) { index = store.index(options.index.name); + var excludeLower = !!options.index.excludeLower; + var excludeUpper = !!options.index.excludeUpper; if (index) { if (options.index.lower && options.index.upper) { - bounds = IDBKeyRange.bound(options.index.lower, options.index.upper); + bounds = IDBKeyRange.bound(options.index.lower, options.index.upper, excludeLower, excludeUpper); } else if (options.index.lower) { - bounds = IDBKeyRange.lowerBound(options.index.lower); + bounds = IDBKeyRange.lowerBound(options.index.lower, excludeLower); } else if (options.index.upper) { - bounds = IDBKeyRange.upperBound(options.index.upper); + bounds = IDBKeyRange.upperBound(options.index.upper, excludeUpper); } else if (options.index.only) { bounds = IDBKeyRange.only(options.index.only); } diff --git a/js/models/conversations.js b/js/models/conversations.js index 238f7b55..9a2e873f 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -408,7 +408,8 @@ index: { name: 'search', // 'search' index on tokens array lower: query, - upper: upper + upper: upper, + excludeUpper: true } }).always(resolve); }.bind(this));