From 7e61bb0b32331940430d698f5116502a04d362fe Mon Sep 17 00:00:00 2001 From: Noa Aviel Dove Date: Tue, 12 Mar 2024 19:45:08 -0700 Subject: [PATCH] Refactor manifest ES request creation --- src/azul/service/elasticsearch_service.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/azul/service/elasticsearch_service.py b/src/azul/service/elasticsearch_service.py index eb880b2541..b08f102cb8 100644 --- a/src/azul/service/elasticsearch_service.py +++ b/src/azul/service/elasticsearch_service.py @@ -663,13 +663,14 @@ def create_chain(self, def create_request(self, catalog: CatalogName, - entity_type: str + entity_type: str, + doc_type: DocumentType = DocumentType.aggregate ) -> Search: """ - Create an Elasticsearch request against the index containing aggregate - documents for the given entity type in the given catalog. + Create an Elasticsearch request against the index containing documents + for the given entity+document type in the given catalog. """ return Search(using=self._es_client, index=str(IndexName.create(catalog=catalog, qualifier=entity_type, - doc_type=DocumentType.aggregate))) + doc_type=doc_type)))