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

Question about removed_docs argument to query #10

Closed
tmpfs opened this issue Aug 11, 2022 · 2 comments
Closed

Question about removed_docs argument to query #10

tmpfs opened this issue Aug 11, 2022 · 2 comments

Comments

@tmpfs
Copy link
Collaborator

tmpfs commented Aug 11, 2022

Thanks for the library, I spent quite a bit of time researching the available libraries for my project and this one strikes the perfect balance for my needs, in particular the support for webassembly is critical!

It seems that if I vacuum the index then there is no need to pass removed_docs as the last argument to query?

Am i right in thinking that the removed_docs argument exists to support the case when documents have been removed but not yet vacuumed from the index and the query should ignore them?

@marcus-pousette
Copy link
Collaborator

Thanks for your question! Great that you find it useful!

You have understood it correctly. You only need to pass it if you have not vacuumed the index. The reason for this is that vacuum is a scanning operation, while passing the removed_docs HashSet acts like a filter. An easy condition for vacuuming could be to do it when the removed_docs set has grown too large. Or do it every X minute (depends on your use case)

@tmpfs
Copy link
Collaborator Author

tmpfs commented Aug 11, 2022

Thanks for the prompt reply, much appreciated 🙏

@tmpfs tmpfs closed this as completed Aug 11, 2022
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