user/dev discussion of public-inbox itself
 help / color / mirror / Atom feed
From: Eric Wong <>
Subject: brain dump detached/external index so far...
Date: Sun, 13 Sep 2020 06:55:50 +0000
Message-ID: <20200913065550.GA2337@dcvr> (raw)

[This should eventually be put into a section 5 manpage
 similar to our existing v1+v2 format manpages]

One feature I've been working on is detached/external indices
for Xapian search.

Currently (and since the earliest days of this project
supporting Xapian), indices were per-inbox.  This allowed
inboxes to be isolated, making it easy to add and remove

The detached/external indices will allows a merging of
several existing inboxes into a single (or several)
virtual inboxes.


  We want a cross-inbox search in the WWW UI,
  and perhaps an "All Mail" IMAP/JMAP inbox.

Initial idea:

  We already use Xapian shards.  Bump RLIMIT_NOFILE, put all the
  existing shards together, query, and done!


  Queries are unusably slow with hundreds of shards:
  (and we'd expect hundreds of thousands of shards)


  Another index, independent of existing per-inbox indices.
  Sharded to CPU core count (similar to V2).

  over.sqlite3 is pretty useful for sharding + deduplication,
  so it will be used here, too.  msgmap.sqlite3 may be optional,
  since its really only needed for NNTP...

  Existing public-inboxes can be attached to the new index.
  Detaching might not be supported right away...


  More stuff to documente, more stuff for users to learn.

  Increased disk space and page cache utilization.  Eventually,
  the web UI should be able to just use the detached index for
  search.  Unfortunately, IMAP search relies on UIDs which are
  per-inbox, at least.

  Removing an inbox from the index can be tricky, will need a
  "GC" command.


  Unindexing from "public-inbox-learn spam" may be tricky.  We
  need a way to prevent an untrusted inbox we're mirroring from
  unindexing a message that isn't marked as deleted from a
  "trusted" inbox.

  Purge + edit support will be similarly tricky, I think.

  We will probably require existing inboxes to have
  indexlevel=basic before an inbox can belong to a
  detached/external index.


  Deduplication built-in.  Cross-posted messages only get
  expensive Xapian data indexed once (multiple List-Id can
  get attached to each message).

  For users who can forgo per-inbox IMAP search, this may
  lead to space savings for WWW search with many inboxes.
  indexlevel=basic for NNTP and IMAP (w/o search) doesn't
  require too much space.

Extra benefits of this approach:

  The potential to provide a transition from v1 to v2 inboxes
  by exposing them as a union of existing inboxes.

  "Private inbox" support with local flags (delete, seen, replied)

  Any number of virtual inboxes for grouping similar projects
  together can be created by combinations of existing v1/v2


  My brain hasn't been working quite right...
  Heat + pandemic + power outages + insects + poor air quality
  have all been taking their toll :<

             reply	other threads:[~2020-09-13  6:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-13  6:55 Eric Wong [this message]
2020-09-14 16:01 ` Konstantin Ryabitsev
2020-09-14 20:55   ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200913065550.GA2337@dcvr \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

user/dev discussion of public-inbox itself

This inbox may be cloned and mirrored by anyone:

	git clone --mirror
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ \
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
 note: .onion URLs require Tor:

code repositories for the project(s) associated with this inbox:

AGPL code for this site: git clone