Commit 646e70a38f1daae390271c3ad65c4b6c0d87de5f
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.cel committed on 3/28/2020, 5:55:29 PM
Parent: 299e45bd399be4986b40a7c95c9dd92b3a71acbd
Files changed
lib/app.js | changed |
lib/app.js | ||
---|---|---|
@@ -760,24 +760,14 @@ | ||
760 | 760 … | ) |
761 | 761 … | } |
762 | 762 … | |
763 | 763 … | App.prototype.filter = function (plugin, opts, filter) { |
764 | - // work around flumeview-query not picking the best index. | |
765 | - // %b+QdyLFQ21UGYwvV3AiD8FEr7mKlB8w9xx3h8WzSUb0=.sha256 | |
766 | 764 … | var limit = Number(opts.limit) |
767 | - var index | |
768 | - if (plugin === this.sbot.backlinks) { | |
769 | - var c = filter && filter.value && filter.value.content | |
770 | - var filteringByType = c && c.type | |
771 | - if (opts.sortByTimestamp) index = 'DTA' | |
772 | - else if (filteringByType) index = 'DTS' | |
773 | - } | |
774 | 765 … | var filterOpts = { |
775 | - $gt: opts.gt, | |
776 | - $lt: opts.lt, | |
766 … | + $gt: opts.gt || 1438957925282, | |
767 … | + $lt: opts.lt || Date.now(), | |
777 | 768 … | } |
778 | 769 … | return plugin.read({ |
779 | - index: index, | |
780 | 770 … | reverse: opts.reverse, |
781 | 771 … | limit: limit || undefined, |
782 | 772 … | query: [{$filter: u.mergeOpts(filter, opts.sortByTimestamp ? { |
783 | 773 … | value: { |
Built with git-ssb-web