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

in memory indexing #20

Open
a-chris opened this issue Aug 28, 2023 · 2 comments
Open

in memory indexing #20

a-chris opened this issue Aug 28, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@a-chris
Copy link

a-chris commented Aug 28, 2023

hello everyone, thanks for your work on this gem.
I'm looking forward to use it but our use-case is a bit different: we need to filter ~100 contents at a time, then we delete the index and go with the other 100 contents, and so on for thousands of times a day.

I was wondering, is it possible to use in memory indexing instead of writing on file?

I saw that tantivy supports this use-case
https://docs.rs/tantivy/latest/tantivy/struct.Index.html#method.create_in_ram

I've never worked with Ruby and Rust extensions but I can dive into a solution if you tell me that's feasible

UPDATE: I've been playing a bit with the code and it seems that this change does most of the job
a-chris@9c47fc0

Is it something you would like to have on tantiny? Maybe making it configurable while creating a new Index object?

@bendangelo
Copy link

Can you open a PR for this change?

@baygeldin baygeldin added the enhancement New feature or request label Jun 14, 2024
@baygeldin
Copy link
Owner

Sorry, I think I meant to answer this, but then it totally slipped my mind 🤦‍♂️

Swapping the file index with the in-memory index is not something that makes sense to me, but making it configurable definitely sounds great! However, since it's very likely I'm going to archive the repo, this and other changes are better be implemented in forks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants