-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add FTS (Full-Text-Search) Better server starter
- Loading branch information
1 parent
daf5b49
commit 7913e37
Showing
17 changed files
with
48 additions
and
13 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import sqlite3 | ||
|
||
def Initializer_Virtual_Table(): | ||
conn = sqlite3.connect('./database/search-index.db') | ||
|
||
conn.execute('''CREATE VIRTUAL TABLE IF NOT EXISTS information_fts | ||
USING FTS5(site_id, link, title, text, description, keywords, shorttext, added)''') | ||
|
||
conn.close() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import sqlite3 | ||
|
||
def Update_Virtual_Table(): | ||
conn = sqlite3.connect('./database/search-index.db') | ||
|
||
conn.execute('DELETE FROM information_fts') | ||
conn.execute('''INSERT INTO information_fts(site_id, link, title, text, description, keywords, shorttext, added) | ||
SELECT site_id, link, title, text, description, keywords, shorttext, added FROM information''') | ||
|
||
conn.commit() | ||
|
||
conn.close() |
This file contains 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
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
SYS: Loaded: users-account.db | ||
SYS: Initializer Database: search-index.db | ||
SYS: Initializer Censorship Database: censorship.db | ||
SYS: Create Users Account Database: users-account.db | ||
SYS: Start Server: 2024-02-08 18:24:56 | ||
SYS: Loaded: users-account.db | ||
SYS: Loaded: search-index.db |
This file contains 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
Binary file not shown.
This file contains 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
File renamed without changes.
File renamed without changes.