mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-25 16:15:35 +00:00
Raise a warning if the 'query' param of the 'query' method of 'ElasticsearchDocumentStore' is not a string. (#1674)
This commit is contained in:
parent
ec816339bf
commit
08341f5698
@ -721,6 +721,9 @@ class ElasticsearchDocumentStore(BaseDocumentStore):
|
||||
|
||||
# Default Retrieval via BM25 using the user query on `self.search_fields`
|
||||
else:
|
||||
if not isinstance(query, str):
|
||||
logger.warning("The query provided seems to be not a string, but an object "
|
||||
f"of type {type(query)}. This can cause Elasticsearch to fail.")
|
||||
body = {
|
||||
"size": str(top_k),
|
||||
"query": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user