SearchApiResponse Apex class
SearchApiResponse Apex class
This Apex class represents a Coveo Search API search response.
|
|
Note
You should also consult the: |
The following attributes are available on a SearchApiResponse:
-
Map<String,Object> untyped: The raw response, untyped. -
totalCount(integer): The total count of the number of results. -
duration(integer): The query duration inms. -
searchUid(string): The UID to identify the query. -
List<Object> rawResults: The results in raw format. -
List<SearchApiResult> results: The list of theSearchApiResults(search results). -
error(string): The error, if any. -
statusCode (integer): The HTTP status code of the request.
String token = CoveoV2.Globals.generateSearchToken();
CoveoV2.SearchApiResponse response = CoveoV2.SearchApiClient.executeQuery(
new Map<String,Object>{
'q' => 'my query text'
},
'Bearer ' + token);
System.debug(response);