You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes. Typing isn't complete in the current release. We are working on typing all the Elasticsearch structures including queries and responses, but that will come in a later release.
If you use .hits.hits you are accessing the raw response from Elasticsearch. When you use .hits you are accessing the results after being processed by this library, which in my opinion is preferable. The way this is implemented right now is confusing, but my hope is that .hits.hits will give you access to the unmodified response (possibly with missing or generic typing) and .hits will provide access with correct typing.
Since the returned type is actually
AttrList
rather than plain list, accessing those attributes will result in type errors.elasticsearch-dsl-py/elasticsearch_dsl/response/__init__.py
Line 93 in 318ea9a
e.g.,
error: "List[Hit]" has no attribute "total" [attr-defined]
The text was updated successfully, but these errors were encountered: