-
Notifications
You must be signed in to change notification settings - Fork 15
Added support for new Route Search API #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
aaronbrethorst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate your help, but any solution that reverts the very intentional DB driver change I made two months ago isn't going to work, unfortunately. Bhup-GitHUB@fae9999
|
@Bhup-GitHUB The README on https://github.com/mattn/go-sqlite3 explains how to enable fts5. You just need to read it and apply it. |
Thanks for the guidance. I’ll keep the github.com/mattn/go-sqlite3 driver and enable FTS5 per the README by building/testing with -tags "sqlite_fts5" (with CGO enabled). I’ll also document the build flag so others can run the suite successfully. Does this approach align with what you want? |
|
Yes, that sounds greatSent from my iPhoneOn Dec 9, 2025, at 12:06 AM, Bhupesh Kumar ***@***.***> wrote:Bhup-GitHUB left a comment (OneBusAway/maglev#149)
@Bhup-GitHUB The README on https://github.com/mattn/go-sqlite3 explains how to enable fts5. You just need to read it and apply it.
Thanks for the guidance. I’ll keep the github.com/mattn/go-sqlite3 driver and enable FTS5 per the README by building/testing with -tags "sqlite_fts5" (with CGO enabled). I’ll also document the build flag so others can run the suite successfully. Does this approach align with what you want?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were assigned.Message ID: ***@***.***>
|
This reverts commit 8110f8c.
|
hi @aaronbrethorst , I’ve made a few changes . Could you please take a look when you get a chance? If you notice any issues, let me know. thanks |
aaronbrethorst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make sure the tests pass!
Summary #146
/api/where/search/route.jsonusing SQLite FTS5 for full-text route search, matching OneBusAway’s route search spec.routes_ftsvirtual table with triggers to keep FTS data in sync and a rebuild to cover existing data.SearchRoutesByFullTextquery and GTFS manager helper that builds safe prefix queries and caps result size.input, checksmaxCount, and returns list + references consistent with existing/whereendpoints.modernc.org/sqliteto ensure FTS5 is available in tests/builds without native SQLite deps.Implementation Notes
routes_ftswith insert/update/delete triggers; rebuild inserted to backfill existing routes.SearchRoutesByFullText; manager helper constructs FTS-safe"term"*AND-joined queries with limits.internal/restapi/routes.go; uses existing validation/response helpers to match schema of other list endpoints.github.com/mattn/go-sqlite3withmodernc.org/sqlitefor FTS5 availability across environments.Testing
go test ./...