Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save index operations #52

Closed
apple314159 opened this issue Oct 11, 2019 · 1 comment
Closed

Save index operations #52

apple314159 opened this issue Oct 11, 2019 · 1 comment

Comments

@apple314159
Copy link

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.

@tidwall
Copy link
Owner

tidwall commented Nov 15, 2019

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.

@tidwall tidwall closed this as completed Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants