mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-16 16:14:28 -04:00
Introduce SQLite FTS5-powered search backend
Use SQLite's FTS5 extension to power full-text search without any additional dependencies. FTS5 was introduced in SQLite 3.9.0, [released][1] in 2015 so should be available on most SQLite installations at this point in time. [1]: https://www.sqlite.org/changes.html#version_3_9_0
This commit is contained in:
parent
c53ec45a29
commit
8fe5faf4d0
2 changed files with 159 additions and 4 deletions
|
@ -213,6 +213,11 @@ CONFIG_SCHEMA: Dict[str, ConfigDefaultDict] = {
|
|||
'SONIC_COLLECTION': {'type': str, 'default': 'archivebox'},
|
||||
'SONIC_BUCKET': {'type': str, 'default': 'snapshots'},
|
||||
'SEARCH_BACKEND_TIMEOUT': {'type': int, 'default': 90},
|
||||
# SQLite3 FTS5
|
||||
'FTS_SEPARATE_DATABASE': {'type': bool, 'default': True},
|
||||
'FTS_TOKENIZERS': {'type': str, 'default': 'porter unicode61 remove_diacritics 2'},
|
||||
# Default from https://www.sqlite.org/limits.html#max_length
|
||||
'FTS_SQLITE_MAX_LENGTH': {'type': int, 'default': int(1e9)},
|
||||
},
|
||||
|
||||
'DEPENDENCY_CONFIG': {
|
||||
|
@ -345,6 +350,7 @@ ALLOWED_IN_OUTPUT_DIR = {
|
|||
'yarn.lock',
|
||||
'static',
|
||||
'sonic',
|
||||
'search.sqlite3',
|
||||
ARCHIVE_DIR_NAME,
|
||||
SOURCES_DIR_NAME,
|
||||
LOGS_DIR_NAME,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue