Skip to content

Commit

Permalink
Merge pull request #4387 from freelawproject/4385-tweak-sweep-indexer…
Browse files Browse the repository at this point in the history
…-supported-models

4385 Moved sweep indexer supported_models to settings.
  • Loading branch information
mlissner authored Aug 30, 2024
2 parents b351cde + fb99c28 commit b641780
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
9 changes: 1 addition & 8 deletions cl/search/management/commands/sweep_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand Down
12 changes: 12 additions & 0 deletions cl/settings/third_party/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b641780

Please sign in to comment.