diff options
-rw-r--r-- | server.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -59,6 +59,10 @@ class EventHandler(FileSystemEventHandler): def index(path, parent): + if os.path.basename(path).startswith("."): + # Skip hidden files + return + print("Indexing", path, parent) s = os.stat(path) if os.path.isfile(path): @@ -133,6 +137,7 @@ def unindex(id): def search(text, limit): + print("Search", text, limit) emb = model.embed_text(text).cpu().numpy() res = cur.execute( "SELECT idx.path FROM emb LEFT JOIN idx ON emb.id = idx.id WHERE embedding MATCH ? AND k = ? ORDER BY distance", |