ElasticResponse class

An object containing the response for a given query

See https://www.elastic.co/guide/en/app-search/current/search.html

Annotations
  • @freezed

Constructors

ElasticResponse({required ElasticResponseMeta meta, required List<ElasticResult> results, @JsonKey(name: "facets") Map<String, List<ElasticFacet>>? rawFacets})
factory
ElasticResponse.fromJson(Map<String, dynamic> json)
factory

Properties

copyWith → $ElasticResponseCopyWith<ElasticResponse>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
meta ElasticResponseMeta
Object delimiting the results meta data.
no setterinherited
rawFacets Map<String, List<ElasticFacet>>?
Map of facets passed to the query
no setterinherited
results List<ElasticResult>
Array of results matching the search.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

facet(String field) ElasticFacet?
Easier way to retrieve a single facet
facets(String field) List<ElasticFacet>?
Easier way to retrieve a list of facets rather than use the raw map
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited