DVHttpSearchProvider<TModel, TFacets> class
abstract
Shared behaviour for hosted search services reached over HTTP.
The service owns the index, so results arrive as JSON documents; fromJson turns each hit back into the application's model.
- Implemented types
-
- DVSearchProvider<
TModel, TFacets>
- DVSearchProvider<
Constructors
-
DVHttpSearchProvider({required Uri baseUrl, required String apiKey, required String indexName, required TModel fromJson(Map<
String, Object?> hit), DVSearchFacetFilter<TFacets> ? facetFilter, DVHttpSend transport = dvSendHttpRequest}) -
const
Properties
- apiKey → String
-
final
- baseUrl → Uri
-
final
-
facetFilter
→ DVSearchFacetFilter<
TFacets> ? -
final
-
fromJson
→ TModel Function(Map<
String, Object?> hit) -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- indexName → String
-
final
- providerName → String
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transport → DVHttpSend
-
final
Methods
-
buildRequest(
String query, List< String> filters, int page, int perPage) → DVHttpRequest -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query(
String query, {TFacets? facets, int page = 1, int perPage = 20}) → Future< DVSearchResultPage< TModel> > -
override
-
readHits(
Map< String, Object?> payload, String key) → List<TModel> -
readResponse(
Map< String, Object?> payload, int page, int perPage) → DVSearchResultPage<TModel> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited