logancyang / obsidian-copilot

THE Copilot in Obsidian
https://www.obsidiancopilot.com/
GNU Affero General Public License v3.0
3.05k stars 213 forks source link

Re-indexing on every restart of Obsidian #834

Open nieleyde opened 1 day ago

nieleyde commented 1 day ago

Copilot version: 2.7.2

Describe how to reproduce I have set Copilot auto-index vault policy to NEVER. I am using mxbai-embed-large embedding model via ollama. I trigger command to re-index. I have about 9K+ files processed successfully. I am able to successfully run Vault QA on my documents. I can add/edit new documents. I initiate the refresh index command, and the new documents get indexed correctly. Once again, I am able successfully run Vault QA on my documents. However when I shutdown Obsidian and restart, Vault QA doesn't work. I initiate the refresh index command, and all the documents (9k+) are reindexed.

Expected behavior I would have expected the vector store to persist between Obsidian sessions. When I restart Obsidian, I shouldn't need to re-index the entire vault. I am pretty sure this was the behavior with prior versions of copilot.

logancyang commented 1 day ago

Ok I can reproduce, this is the error message I see

plugin:copilot:139939 Error initializing Orama database: SyntaxError: Expected ',' or ']' after array element in JSON at position 101187584 (line 1 column 101187585)
    at JSON.parse (<anonymous>)
    at VectorStoreManager.initializeDB
logancyang commented 1 day ago

I can't reproduce on my new feature branch 2.7.3, it should be fixed in the next release.