SearchServiceClient. It provides the (http) client/connection to the search backend service.
- Source:
Classes
Type Definitions
HttpSearchClient
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
config |
HttpSearchConfig | |
search |
SearchService |
- Source:
HttpSearchConfig
Configures the HTTP request for the search.
Type:
- Object
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
searchUrlTemplate |
string | url for the HTTP request for the search |
||
searchMethod |
string |
<optional> |
"POST" | HTTP method for the search. Defaults to "POST". |
searchContentType |
string |
<optional> |
"application/json" | HTTP content type of the request body. Defaults to "application/json". |
searchBodyTemplate |
string |
<optional> |
null | HTTP request body template that may contain variables (e.g. {{searchParameters}}) in double curly brackets, or null if there is none. |
debugMode |
boolean |
<optional> |
false | debug mode prints some more info to the console. |
- Source:
ParsedHttpResponseAvailable(resultData, httpStatus)
This function will be called when a already parsed response of the HTTP request is available.
Parameters:
| Name | Type | Description |
|---|---|---|
resultData |
Object | already parsed data object containing the results of the HTTP request |
httpStatus |
number | HTTP response status |
- Source:
SearchService(searchParameters, onSearchResultsAvailable)
This function triggers search by calling the search service.
Parameters:
| Name | Type | Description |
|---|---|---|
searchParameters |
Object | object that contains all parameters as properties. It will be converted to JSON. |
onSearchResultsAvailable |
SearchServiceResultAvailable | will be called when search results are available. |
- Source:
SearchServiceResultAvailable(searchResultData)
This function will be called, when search results are available.
Parameters:
| Name | Type | Description |
|---|---|---|
searchResultData |
Object | already parsed data object containing the result of the search |
- Source:
TextHttpResponseAvailable(resultText, httpStatus)
This function will be called when a response of the HTTP request is available as text.
Parameters:
| Name | Type | Description |
|---|---|---|
resultText |
Object | response body as text |
httpStatus |
number | HTTP response status |
- Source: