aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519>2020-03-24 14:13:42 -0400
committercel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519>2020-03-28 13:55:29 -0400
commit646e70a38f1daae390271c3ad65c4b6c0d87de5f (patch)
tree2cd5f8deab95104717a326d1529409e8299bc858
parent299e45bd399be4986b40a7c95c9dd92b3a71acbd (diff)
downloadpatchfoo-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.
-rw-r--r--lib/app.js14
1 files 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 ? {