diff options
author | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2020-03-24 14:13:42 -0400 |
---|---|---|
committer | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2020-03-28 13:55:29 -0400 |
commit | 646e70a38f1daae390271c3ad65c4b6c0d87de5f (patch) | |
tree | 2cd5f8deab95104717a326d1529409e8299bc858 /lib/app.js | |
parent | 299e45bd399be4986b40a7c95c9dd92b3a71acbd (diff) | |
download | patchfoo-646e70a38f1daae390271c3ad65c4b6c0d87de5f.tar.gz patchfoo-646e70a38f1daae390271c3ad65c4b6c0d87de5f.zip |
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.
Diffstat (limited to 'lib/app.js')
-rw-r--r-- | lib/app.js | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -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 ? { |