Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions elasticsearch_dsl/response/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
Generic,
Iterator,
List,
Mapping,
Optional,
Sequence,
Tuple,
Union,
cast,
Expand All @@ -32,6 +34,7 @@
from .hit import Hit, HitMeta

if TYPE_CHECKING:
from .. import types
from ..aggs import Agg
from ..faceted_search_base import FacetedSearchBase
from ..search_base import Request, SearchBase
Expand All @@ -41,11 +44,47 @@


class Response(AttrDict[Any], Generic[_R]):
"""An Elasticsearch response.

:arg took: (required)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly none of the response attributes appear to have documentation.

:arg timed_out: (required)
:arg _shards: (required)
:arg hits: search results
:arg aggregations: aggregation results
:arg _clusters:
:arg fields:
:arg max_score:
:arg num_reduce_phases:
:arg profile:
:arg pit_id:
:arg _scroll_id:
:arg suggest:
:arg terminated_early:
"""

_search: "SearchBase[_R]"
_faceted_search: "FacetedSearchBase[_R]"
_doc_class: Optional[_R]
_hits: List[_R]

took: int
timed_out: bool
_shards: "types.ShardStatistics"
_clusters: "types.ClusterStatistics"
fields: Mapping[str, Any]
max_score: float
num_reduce_phases: int
profile: "types.Profile"
pit_id: str
_scroll_id: str
suggest: Mapping[
str,
Sequence[
Union["types.CompletionSuggest", "types.PhraseSuggest", "types.TermSuggest"]
],
]
terminated_early: bool

def __init__(
self,
search: "Request[_R]",
Expand Down
Loading
Loading