Do not store word filters index to file. Not necessary for now

- It's more of a hassle to not let word filter go stale on entry
  updates
- Generating index on 120K lines of notes takes 1s. Loading from file
  takes 0.2s. For less content load time difference will be even smaller
- Let go of startup time improvement for simplicity for now
This commit is contained in:
Debanjum Singh Solanky
2022-09-07 02:43:58 +03:00
parent 91d11ccb49
commit c17a0fd05b
5 changed files with 33 additions and 62 deletions

View File

@@ -58,7 +58,7 @@ def model_dir(search_config: SearchConfig):
compressed_jsonl = model_dir.joinpath('notes.jsonl.gz'),
embeddings_file = model_dir.joinpath('note_embeddings.pt'))
filters = [DateFilter(), WordFilter(model_dir, search_type=SearchType.Org), FileFilter()]
filters = [DateFilter(), WordFilter(), FileFilter()]
text_search.setup(org_to_jsonl, content_config.org, search_config.asymmetric, regenerate=False, filters=filters)
return model_dir