-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: