diff --git a/handlers.py b/handlers.py index 353d86f..477ad69 100644 --- a/handlers.py +++ b/handlers.py @@ -210,7 +210,7 @@ def handle_search(query): # Hybrid search: merge BM25 + semantic via RRF bm25_ids = [r["id"] for r in bm25_rows] chunk_snippets = {} # page_id -> best chunk text - if get_setting("semantic_search", "1") == "1": + if get_setting("semantic_search", "0") == "1": try: from embeddings import hybrid_search use_reranker = get_setting("use_reranker", "1") == "1" @@ -468,7 +468,7 @@ def handle_add_manual_submit(body): db.commit() # Generate embeddings for this page (if semantic search is enabled) - if get_setting("semantic_search", "1") == "1": + if get_setting("semantic_search", "0") == "1": try: from embeddings import store_embeddings # Pass the page_id, title, description, and db connection @@ -1219,7 +1219,7 @@ def handle_subscription_sync(sub_id): (sub_id, s["url"], s["title"], s.get("note", ""), tags_str), ) # Embed remote page for semantic search - if get_setting("semantic_search", "1") == "1": + if get_setting("semantic_search", "0") == "1": try: from embeddings import store_remote_embeddings rp_id = db.execute( @@ -1295,7 +1295,7 @@ def handle_subscription_syncall(): "ON CONFLICT(subscription_id, url) DO UPDATE SET title=excluded.title, note=excluded.note, tags=excluded.tags", (sub["id"], s["url"], s["title"], s.get("note", ""), tags_str), ) - if get_setting("semantic_search", "1") == "1": + if get_setting("semantic_search", "0") == "1": try: from embeddings import store_remote_embeddings rp_id = db.execute( @@ -1325,7 +1325,7 @@ _reindex_thread = None def handle_reindex_form(): - if get_setting("semantic_search", "1") != "1": + if get_setting("semantic_search", "0") != "1": return _respond( f"

semantic search index

" f"

Semantic search is disabled. Enable it in settings to use embeddings.

"