Repository navigation
pitbot: local FTS5 search mirror so our index makes the cut (0.13.1) - #92
Merged
Merged
Conversation
Live, the 'pit' engine never appeared in results: nichedb's full-text search runs against the GIN index of its whole items table, 1 s for a two-word query and 3.8 s for three, and pit.world waits 2.5 s for a slow engine. Restricting to the crawler's source did not help (1.0 s on 27.8k rows) because the cost is the global match, and re-indexing that table in production is the thing that has stalled it before. So the publish job now also writes each batch into a SQLite FTS5 mirror (/data/index.db, a compose volume) and the crawler answers nichedb's /api/v1/search shape on loopback: quoted tokens (any input is a valid query), all words first then any word, bm25 with title weighted most, a re-crawl replaces the page. pit.world's 'pit' engine reads it by default (PIT_INDEX_URL still selects nichedb or off). nichedb stays the published store. /status shows how many pages are searchable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #91. Live, the
pitengine never made it into results: nichedb's full-text search takes 1 to 3.8 s (it matches against the GIN index of its whole items table; restricting to the crawler's source still took 1.0 s on 27.8k rows), and pit.world gives a slow engine 2.5 s./data/index.dbon a compose volume); the crawler answers nichedb's/api/v1/searchshape on loopback in milliseconds. Any input is a valid query (quoted tokens), all words first then any word, bm25 with title weighted most, re-crawls replace pages.pitengine defaults to that mirror (127.0.0.1:8807);PIT_INDEX_URL=https://nichedb.devoroffstill work. nichedb stays the open published store.Tests: 250 pass with Redis (4 new for the mirror: punctuation-proof queries, AND→OR, upsert, publish fills the mirror with nichedb off). Typecheck and ThreatCrush clean.
🤖 Generated with Claude Code