ProfileSearchResult constructor

ProfileSearchResult(
  1. Kuzzle kuzzle, {
  2. KuzzleRequest? request,
  3. required KuzzleResponse response,
})

Implementation

ProfileSearchResult(
  Kuzzle kuzzle, {
  KuzzleRequest? request,
  required KuzzleResponse response,
}) : super(kuzzle, request: request, response: response) {
  searchAction = 'searchProfiles';
  scrollAction = 'scrollProfiles';

  hits = (response.result['hits'] as List)
      .map((hit) => KuzzleProfile(kuzzle,
          uid: hit['_id'] as String?,
          policies: hit['_source']['policies'] as List?))
      .toList();
}