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: