From 04a470f890cbf127688ba502bbb1eaac4b1dbe75 Mon Sep 17 00:00:00 2001 From: Ikram Ali Date: Sat, 3 Jul 2021 17:02:44 +0500 Subject: [PATCH] SQLDocumentStore get_label_count() bug fixed. (#1251) --- haystack/document_store/sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haystack/document_store/sql.py b/haystack/document_store/sql.py index f23ab422d..57f85bdcd 100644 --- a/haystack/document_store/sql.py +++ b/haystack/document_store/sql.py @@ -406,7 +406,7 @@ class SQLDocumentStore(BaseDocumentStore): """ Return the number of labels in the document store """ - index = index or self.index + index = index or self.label_index return self.session.query(LabelORM).filter_by(index=index).count() def _convert_sql_row_to_document(self, row) -> Document: