Request Builders
The request builder is a class responsible for constructing a SearchRequest object which will be sent to the Hawksearch Search API. It provides a Fluent API.
Base class: BaseRequestBuilder<TBuilder>
Methods:
public TBuilder ForLanguage(string languageCode)
Instructs the request to be made for this specific language code
Â
public TBuilder InCatalog(int catalogId)
Instructs the request to be made for this specific catalog
Â
public TBuilder InMarket(string marketId)
Instructs the request to be made for this specific market
Â
Instructs the request to be made for Optimizely published content only
Â
Instructs the request to be made for a specific field with a given value and a known field search type.
This field search type is described at https://hawksearch.atlassian.net/wiki/spaces/HSKB/pages/1971191809/Field-Specific+Search+-+V2 and has a code-wise equivalent using theFieldSearchType
enumeration
Instructs the request to perform a custom query. The query must use the syntax exemplified in the official Hawksearch documentation: https://hawksearch.atlassian.net/wiki/spaces/HSKB/pages/1971191809/Field-Specific+Search+-+V2
Search
Class: SearchRequestBuilder
Â
Methods:
Constructs the final search request based on the provided SearchQuery object.
Â
Adds a search filter convertor to the current builder.
Â
Example:
Â
Autocomplete
Class: AutocompleteRequestBuilder
Â
Methods:
Constructs the final search request based on the provided keyword.
Â
Indicates whether a standard response is sent or a full item response needs to be used: https://hawksearch.atlassian.net/wiki/spaces/HSKB/pages/1754857538/Hawksearch+v4.0+-+Autocomplete+API
Example:
Â