diff --git a/haystack/document_store/elasticsearch.py b/haystack/document_store/elasticsearch.py index ca0cdb097..c9403342b 100644 --- a/haystack/document_store/elasticsearch.py +++ b/haystack/document_store/elasticsearch.py @@ -380,7 +380,7 @@ class ElasticsearchDocumentStore(BaseDocumentStore): } ) body["query"]["bool"]["filter"] = filter_clause - result = scan(self.client, query=body, index=index) + result = list(scan(self.client, query=body, index=index)) return result diff --git a/requirements.txt b/requirements.txt index 3f939efb8..8f2449277 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ gunicorn pandas sklearn psycopg2-binary; sys_platform != 'win32' and sys_platform != 'cygwin' -elasticsearch +elasticsearch>=7.7,<=7.10 elastic-apm tox coverage diff --git a/test/test_reader.py b/test/test_reader.py index 5024a7a0e..819875773 100644 --- a/test/test_reader.py +++ b/test/test_reader.py @@ -28,7 +28,7 @@ def test_output(prediction): def test_no_answer_output(no_answer_prediction): assert no_answer_prediction is not None assert no_answer_prediction["question"] == "What is the meaning of life?" - assert math.isclose(no_answer_prediction["no_ans_gap"], -14.4729533, rel_tol=0.0001) + assert math.isclose(no_answer_prediction["no_ans_gap"], -13.048564434051514, rel_tol=0.0001) assert no_answer_prediction["answers"][0]["answer"] is None assert no_answer_prediction["answers"][0]["offset_start"] == 0 assert no_answer_prediction["answers"][0]["offset_end"] == 0