richie icon indicating copy to clipboard operation
richie copied to clipboard

🔧(search) add elastic search client custom settings

Open igobranco opened this issue 2 years ago • 2 comments

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

igobranco avatar Feb 24 '22 17:02 igobranco

@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 avatar Jun 28 '22 10:06 igobranco

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.

igobranco avatar Aug 29 '22 15:08 igobranco