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

Resilience for batch indexing #57

Open
pandu-k opened this issue Feb 11, 2023 · 2 comments
Open

Resilience for batch indexing #57

pandu-k opened this issue Feb 11, 2023 · 2 comments

Comments

@pandu-k
Copy link
Collaborator

pandu-k commented Feb 11, 2023

Add_docs calls should be resilient for batch indexing.

There should be a variable in add_documents, where you can pass a function to deal with errors.

This function will have this structure:

def error_handler(Exception):
     # your code here. Perhaps raise for certain types of error, add errors to your custom log object etc.

add_docs call:

my_index.add_documents(docs=docs, error_handler=retry_on_429s)
@pandu-k
Copy link
Collaborator Author

pandu-k commented Feb 11, 2023

We can have inbuilt functions, that can be used, if customers don't want to write their own. For example:

my_index.add_documents(docs=docs, error_handler=mq.error_handlers.ignore_429)

@vicilliar
Copy link
Contributor

In the handlers, it could be a good idea to have configurable parameters like time_to_retry and max_retries if the user wants to set them too

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