Repository navigation
Proposal: TopK driver for Laravel Scout #62510
Unanswered
davidmyriel
asked this question in
Ideas
Replies: 1 comment
|
A useful Scout-level check would round-trip an ordered page of results with deleted model IDs between the search and Eloquent hydration. The driver needs to preserve TopK’s relevance order for surviving IDs. It also needs a clear count/total contract for pagination when stale indexed IDs cannot be hydrated. Exact SQL assertions alone won’t catch that. For flush and delete, another opt-in live check could write to two index names in one project, flush one, and verify documents in the other still appear. That makes the scope of project credentials versus per-index operations easy to review, whether this ships as a built-in engine or a separate package. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi! I work on TopK, a hosted search engine with keyword (BM25), semantic, and hybrid search. I'd like to propose a first-party TopK driver for Scout, alongside Algolia, Meilisearch, Typesense, and Turbopuffer, and wanted to check whether you'd be open to it before sending PRs. (
laravel/scoutonly takes bug reports as issues, so I'm posting here.)What it would look like
Design
pdo_pgsql, the same way the database engine connects to Postgres. Values and identifiers are escaped or validated before any SQL is sent.laravel/aiortoSearchableEmbedding(). Setting the embedding driver tolaravel-aiuses Scout-generated or precomputed vectors instead, following the Turbopuffer driver.semantic()(includingminSimilarity),hybrid()weights,where/whereIn/whereNotIn, ordering when browsing, pagination with real totals, soft deletes,scout:index/scout:delete-index/scout:flush, and the custom search callback.schemaadds filterable fields.Status
The implementation follows the Turbopuffer driver's structure (
TopkEngine,TopkClient, config block,EngineManager::createTopkDriver()):TOPK_API_KEYis set) that runs keyword, filtered, paginated, semantic, and hybrid searches plus delete and flush against a real TopK project. It passes.scout.mdandsearch.md, and TopK added to the Scout Boost skill's engine table.Maintenance
The TopK team would maintain the driver, respond to issues that involve it, and can provide a test API key for CI if that's useful.
If this sounds good, I'll open the
laravel/scoutPR and the matchinglaravel/docsPR. Happy to change anything about the approach first, e.g. shipping it as a separate package instead.All reactions