0

I use 3.xx version of litedb and want to shrink the file since it always grows its size.

I shrunk it using LiteDbExplorer's "shrink" button, but now app cannot use this db file. But still it seems good when using viewer litedbexplorer, litedbviewer, litedbstudio. I can see data well on these viewers.

but when run application then it shows message like "LiteDB.LiteException: Index not found on '<collection_name>._id', at LiteDB.Query.Run(CollectionPage col, indexService indexer) at LiteDB.LiteEngine.<>c__displayClass14_0.b__0(Collectionpage col) ~~~..."

Did I make it broken? but Index on _id(primary key) and other indexes still exist well. I check it using "db.collectionname.indexes".

anybody help me through?

K.S
  • 13
  • 3

1 Answers1

0

It was because of collections' name restriction. If collection's name is not fit then it cannot manipulate itself, not only its documents.

And also LiteDBExplorer's shrinking function might have some problem. It does not work always, but LiteDBshell works. Please use "db.shrink" at shell.

I guess messages like "Invalid format: Collection" at shell can be fixed by changing collection's name.

K.S
  • 13
  • 3