Closed apple314159 closed 4 years ago
Unfortunately, indexes cannot be automatically saved with the AOF file.
This is because the index functions take in less
functions that are programmatically defined, and there's no way to dynamically serialize those operations.
If your indexes are very simple (like a gjson path or binary comparisons) then it should be possible to serialize a custom entry in the buntdb database that defines your indexes.
Then when you open your database, you can load from the database, deserialize, and execute the index operations.
THE AOF saves the set and del operations. However, the index creation operations are not saved. When a program restarts it's hard to reproduce the previous indexes.