Skip to content
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

rebuild-fts command and table.rebuild_fts() method #155

Closed
simonw opened this issue Sep 8, 2020 · 2 comments
Closed

rebuild-fts command and table.rebuild_fts() method #155

simonw opened this issue Sep 8, 2020 · 2 comments
Labels

Comments

@simonw
Copy link
Owner

simonw commented Sep 8, 2020

https://sqlite.org/forum/forumpost/fa777fff86

Easiest thing would be to run a 'rebuild' to rebuild the FTS index from scratch based on the contents of the content table. i.e.

INSERT INTO licenses_fts(licenses_fts) VALUES('rebuild');

https://www.sqlite.org/fts5.html#the_rebuild_command

@simonw simonw added the enhancement New feature or request label Sep 8, 2020
simonw added a commit that referenced this issue Sep 8, 2020
@simonw
Copy link
Owner Author

simonw commented Sep 8, 2020

For the command version:

sqlite-utils rebuild-fts mydb.db

This will rebuild all detected FTS tables. You can also specify one or more explicit tables:

sqlite-utils rebuild-fts mydb.db dogs

simonw added a commit that referenced this issue Sep 8, 2020
This isn't necessary any more since the new .rebuild_fts()
method can achieve the same thing.

Refs #155, #153
@simonw
Copy link
Owner Author

simonw commented Sep 8, 2020

I'm going to update sqlite-utils optimize to also take an optional list of tables, for consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant