Closed xxxserxxx closed 2 years ago
Hi, thank you for signaling this problem. As you correctly pointed out, the index was never reloaded from disk. My last commit should fix the problem.
Let me know if it works!
Looks good; thanks for the quick fix!
I may be doing something wrong; if so, please point it out. However, after closing and re-opening a database,
FindById()
does not find any documents.What I do here is:
FindById()
FindAll()
, and get the ID from itFindById()
using the ID in step 5On my end, once I close the DB no documents are able to be referenced by ID.
Clover: github.com/ostafen/clover v0.0.0-20220302164508-28d538d46bc1
Go: go version go1.17.8 linux/amd64
Edit
I believe this is because the collection index is never updated except when documents are inserted. Specifically, the index is never refreshed when the collection is loaded -- or, at least, I can't find where this happens.