git ssb

16+

cel / patchfoo



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.jschanged
lib/app.jsView
@@ -760,24 +760,14 @@
760760 )
761761 }
762762
763763 App.prototype.filter = function (plugin, opts, filter) {
764- // work around flumeview-query not picking the best index.
765- // %b+QdyLFQ21UGYwvV3AiD8FEr7mKlB8w9xx3h8WzSUb0=.sha256
766764 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- }
774765 var filterOpts = {
775- $gt: opts.gt,
776- $lt: opts.lt,
766 + $gt: opts.gt || 1438957925282,
767 + $lt: opts.lt || Date.now(),
777768 }
778769 return plugin.read({
779- index: index,
780770 reverse: opts.reverse,
781771 limit: limit || undefined,
782772 query: [{$filter: u.mergeOpts(filter, opts.sortByTimestamp ? {
783773 value: {

Built with git-ssb-web