chore(PROJ-60): Xapian-Legacy-Backend vollständig aus dem Code entfernt

Xapian war seit der Manticore-Migration (PROJ-30) nur noch ein
build-tag-gatetes, in Produktion nie genutztes Legacy-Backend.
internal/index/xapian.go, xapian_stub.go, xapian_wrapper.cpp/.h entfernt;
index.New() unterstützt jetzt nur noch "manticore". Default-Fallbacks in
Nebenwerkzeugen (archivmail-import/-export, cmd_export/cmd_reindex/...)
von "xapian" auf "manticore" korrigiert, Xapian-spezifische Tests entfernt,
Kommentare bereinigt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
sysops
2026-06-25 00:12:06 +02:00
co-authored by Claude Sonnet 4.6
parent 043520ecc3
commit 5f63bfe8d4
15 changed files with 28 additions and 614 deletions
+16 -7
View File
@@ -68,7 +68,7 @@ type Indexer interface {
// updates of the OCR-extracted attachment text. Optional add-on to Indexer:
// callers should type-assert and degrade gracefully if not supported.
//
// PROJ-35: Manticore implements this; legacy Xapian does not.
// PROJ-35: implemented by the Manticore backend.
type AttachmentTextUpdater interface {
UpdateAttachmentText(mailID, text string) error
}
@@ -82,20 +82,29 @@ type AttachmentTextReader interface {
}
// TenantIndexer manages per-tenant Indexer instances.
// Implemented by ManticoreTenantManager (primary) and TenantIndexManager (legacy Xapian).
// Implemented by ManticoreTenantManager.
type TenantIndexer interface {
ForTenant(tenantID *int64) Indexer
Global() Indexer
Close() error
}
// New creates an Indexer for the specified backend.
// Deprecated: use NewManticoreTenantManager instead.
// DefaultManticoreDSN is the default Manticore connection string used when no
// explicit DSN is configured.
const DefaultManticoreDSN = "manticore@tcp(127.0.0.1:9306)/?charset=utf8mb4"
// New creates a single (global) Indexer for the specified backend.
// Only "manticore" is supported. For per-tenant indexing prefer
// NewManticoreTenantManager directly.
func New(dir string, batchSize int, backend string) (Indexer, error) {
switch backend {
case "xapian":
return newXapian(dir)
case "manticore":
m, err := NewManticoreTenantManager(DefaultManticoreDSN)
if err != nil {
return nil, err
}
return m.Global(), nil
default:
return nil, fmt.Errorf("unknown index backend: %q (use manticore via NewManticoreTenantManager)", backend)
return nil, fmt.Errorf("unknown index backend: %q (only \"manticore\" is supported)", backend)
}
}