diff --git a/cl/search/management/commands/sweep_indexer.py b/cl/search/management/commands/sweep_indexer.py index 02da4e3687..4cc7b0bc4f 100644 --- a/cl/search/management/commands/sweep_indexer.py +++ b/cl/search/management/commands/sweep_indexer.py @@ -27,14 +27,7 @@ ) from cl.search.types import ESDocumentClassType -supported_models = [ - "audio.Audio", - "people_db.Person", - "search.OpinionCluster", - "search.Opinion", - "search.Docket", - "search.RECAPDocument", -] +supported_models = settings.ELASTICSEARCH_SWEEP_INDEXER_MODELS # type: ignore r = get_redis_interface("CACHE") diff --git a/cl/settings/third_party/elasticsearch.py b/cl/settings/third_party/elasticsearch.py index f9b27e07c0..1450949232 100644 --- a/cl/settings/third_party/elasticsearch.py +++ b/cl/settings/third_party/elasticsearch.py @@ -248,6 +248,18 @@ ELASTICSEARCH_SWEEP_INDEXER_HEADS_RATE = env( "ELASTICSEARCH_SWEEP_INDEXER_HEADS_RATE", default=60 ) +ELASTICSEARCH_SWEEP_INDEXER_MODELS = env( + "ELASTICSEARCH_SWEEP_INDEXER_MODELS", + default=[ + "audio.Audio", + "people_db.Person", + "search.OpinionCluster", + "search.Opinion", + "search.Docket", + "search.RECAPDocument", + ], +) + ELASTICSEARCH_MAX_RESULT_COUNT = 10_000 ELASTICSEARCH_CARDINALITY_PRECISION = 2000