From ceb5c87da0e676499136db472ab35cdc98111cf5 Mon Sep 17 00:00:00 2001 From: Malte Pietsch Date: Thu, 15 Oct 2020 14:40:59 +0200 Subject: [PATCH] Make creation of label index optional (#490) --- haystack/document_store/elasticsearch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/haystack/document_store/elasticsearch.py b/haystack/document_store/elasticsearch.py index 9adf256d12..3ab03c68cb 100644 --- a/haystack/document_store/elasticsearch.py +++ b/haystack/document_store/elasticsearch.py @@ -101,12 +101,12 @@ def __init__( self.faq_question_field = faq_question_field self.custom_mapping = custom_mapping + self.index: str = index + self.label_index: str = label_index if create_index: self._create_document_index(index) - self.index: str = index + self._create_label_index(label_index) - self._create_label_index(label_index) - self.label_index: str = label_index self.update_existing_documents = update_existing_documents self.refresh_type = refresh_type if similarity == "cosine":