From 646e70a38f1daae390271c3ad65c4b6c0d87de5f Mon Sep 17 00:00:00 2001 From: cel Date: Tue, 24 Mar 2020 14:13:42 -0400 Subject: Remove use of backlinks index option The option is no longer an optimization, and the work-around is no longer needed. Implicitly exclude unlikely timestamps. --- lib/app.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/app.js b/lib/app.js index ef0c67d..4fac422 100644 --- a/lib/app.js +++ b/lib/app.js @@ -761,22 +761,12 @@ App.prototype.streamEmojis = function () { } App.prototype.filter = function (plugin, opts, filter) { - // work around flumeview-query not picking the best index. - // %b+QdyLFQ21UGYwvV3AiD8FEr7mKlB8w9xx3h8WzSUb0=.sha256 var limit = Number(opts.limit) - var index - if (plugin === this.sbot.backlinks) { - var c = filter && filter.value && filter.value.content - var filteringByType = c && c.type - if (opts.sortByTimestamp) index = 'DTA' - else if (filteringByType) index = 'DTS' - } var filterOpts = { - $gt: opts.gt, - $lt: opts.lt, + $gt: opts.gt || 1438957925282, + $lt: opts.lt || Date.now(), } return plugin.read({ - index: index, reverse: opts.reverse, limit: limit || undefined, query: [{$filter: u.mergeOpts(filter, opts.sortByTimestamp ? { -- cgit v1.2.3