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

🔧(search) add elastic search client custom settings #1615

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

igobranco
Copy link
Collaborator

Add settings that permit to configure elastic search client with custom configuration like custom timeouts.

@igobranco igobranco linked an issue Feb 24, 2022 that may be closed by this pull request
@igobranco igobranco self-assigned this Feb 24, 2022
src/richie/apps/search/__init__.py Outdated Show resolved Hide resolved
src/richie/apps/search/index_manager.py Outdated Show resolved Hide resolved
@igobranco igobranco force-pushed the igobranco/issues/1613/elasticsearch-timeout branch from 4a5d09f to 041aaa4 Compare March 11, 2022 22:34
@igobranco igobranco force-pushed the igobranco/issues/1613/elasticsearch-timeout branch 3 times, most recently from 318d74f to 820b1cc Compare June 28, 2022 10:06
Add settings that permit to configure elastic search client with custom
configuration like custom timeouts. Closes openfun#1613
@igobranco igobranco force-pushed the igobranco/issues/1613/elasticsearch-timeout branch from 820b1cc to d896920 Compare June 28, 2022 10:36
@igobranco
Copy link
Collaborator Author

@sampaccoud I've addeed a new function new_elasticsearch_client so it is possible to test the ES_CLIENT initialization. Nevertheless, I've removed the custom initialization of all the connections to the elasticsearch (all the calls to the ES_INDICES_CLIENT with custom kwargs). So this PR is more specific to resolve the problem.
So each installation can increase the overall timeout to the elasticsearch.

@igobranco
Copy link
Collaborator Author

During meeting with @sampaccoud we have decided that I'm going to use the Django AppConfig https://github.com/openfun/richie/blob/master/src/richie/apps/search/apps.py , with the ready method to load other ES_CLIENT object. The ES_CLIENT that it's defined in the apps/search/__init__.py should be initialized within a function that can be overwritten on subsequent richie-site-factories.

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

Successfully merging this pull request may close these issues.

Timeout during index creation
2 participants