disabled semantic search by default

This commit is contained in:
lichenblankie 2026-04-08 05:21:08 +00:00
parent 5b32d69863
commit a1320ed4e4
3 changed files with 18 additions and 5 deletions

View file

@ -22,7 +22,20 @@ Download the latest release for your platform from the [GitHub Releases](https:/
| macOS | `TinyWeb-macos-arm64` |
| Linux | `TinyWeb-linux-x64` |
Run the downloaded file — no installation required. Your data is stored in `~/.tinyweb/`.
Run the downloaded file — no installation required.
## Data storage
Your data is stored in `~/.tinyweb/`:
| File | Description |
|------|-------------|
| `index.db` | SQLite database with your indexed pages |
| `tinyweb_identity` | Your Reticulum identity (keep safe!) |
| `models/` | Downloaded AI models for semantic search |
| `index.hnsw` | Semantic search index |
This allows your data to persist between upgrades and stay separate from the application.
### Command line options

4
app.py
View file

@ -139,14 +139,14 @@ def ensure_rns_config(config_dir, transport_host=None, transport_port=None):
def _preload_embeddings():
"""Pre-load the embedding model and build the HNSW index in background."""
if get_setting("semantic_search", "1") != "1":
if get_setting("semantic_search", "0") != "1":
print("Semantic search disabled.")
return
try:
from embeddings import _get_session, _get_reranker, build_index
_get_session()
build_index()
if get_setting("use_reranker", "1") == "1":
if get_setting("use_reranker", "0") == "1":
_get_reranker()
print("Semantic search ready (with reranker).")
else:

View file

@ -678,9 +678,9 @@ def handle_style_form(msg=""):
name = get_site_name()
sharing = get_setting("sharing_enabled", "0")
checked = " checked" if sharing == "1" else ""
semantic = get_setting("semantic_search", "1")
semantic = get_setting("semantic_search", "0")
semantic_checked = " checked" if semantic == "1" else ""
reranker = get_setting("use_reranker", "1")
reranker = get_setting("use_reranker", "0")
reranker_checked = " checked" if reranker == "1" else ""
disabled = "" if semantic == "1" else " disabled"
dimmed = ' style="opacity:0.4"' if semantic != "1" else ""