You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation with #23 only uses like SQL instead of a fulltext search. SQLite3 actually provides full text search. A quick attempt failed however, just adding additional instructions:
addDatabaseIndices::
(MonadIOm, MonadResourcem)
=>ReaderTSqlite.SqlBackendm()
addDatabaseIndices =domapM_ (\x -> withStmt (T.pack x) []) indices
return()where indices = [ "create index stop_time_index ON stop_time (stop_id);"
, "create index trip_index on trip (trip_id, route_id, service_id);"
, "create index route_index on route (route_id);"
, "create index calendar_index on calendar (service_id);"
, "create index stop_index on stop (stop_id, code);"
, "CREATE VIRTUAL TABLE stopsearch USING fts3(stop_id, code, name)"
, "insert into stopsearch(stop_id, code, name) select stop.stop_id, stop.code, stop.name from stop"
]
When creating the database it failed with:
[Debug#SQL] INSERT INTO "update_process"("when","status") VALUES(?,?); [PersistDay 2017-02-07,PersistBool True]
[Debug#SQL] SELECT "id" FROM "update_process" WHERE _ROWID_=last_insert_rowid(); []
[Debug#SQL] INSERT INTO "import_started"("upid") VALUES(?); [PersistInt64 1]
[Debug#SQL] SELECT "id" FROM "import_started" WHERE _ROWID_=last_insert_rowid(); []
[Debug#SQL] create index stop_time_index ON stop_time (stop_id);; []
[Debug#SQL] create index trip_index on trip (trip_id, route_id, service_id);; []
[Debug#SQL] create index route_index on route (route_id);; []
[Debug#SQL] create index calendar_index on calendar (service_id);; []
[Debug#SQL] create index stop_index on stop (stop_id, code);; []
[Debug#SQL] CREATE VIRTUAL TABLE stopsearch USING fts3(stop_id, code, name); []
FAIL
Exception: SQLite3 returned ErrorError while attempting to perform step.
If the need arises, perhaps use fts3 to support fulltext search.
The text was updated successfully, but these errors were encountered:
The implementation with #23 only uses like SQL instead of a fulltext search. SQLite3 actually provides full text search. A quick attempt failed however, just adding additional instructions:
When creating the database it failed with:
If the need arises, perhaps use fts3 to support fulltext search.
The text was updated successfully, but these errors were encountered: