Home > @poq/sdk-sfcc > IContentSearchClient > getContentSearch
Provides keyword and refinement search functionality for content assets. The search result contains only content that is online and assigned to a folder.
Signature:
getContentSearch(q?: string, refine?: Array<string>, sort?: Array<string>, start?: number, count?: number, locale?: string, options?: RequestOptions): Promise<PoqResponse<ContentSearchResult>>;
Parameter | Type | Description |
---|---|---|
q | string | (Optional) The query phrase to search for. |
refine | Array<string> | (Optional) Parameter that represents a refinement attribute/value(s) pair. Refinement attribute id and value(s) are separated by '='. Multiple values are supported by a sub-set of refinement attributes and can be provided by separating them using a pipe (URL encoded = "|"). Value ranges can be specified like this: refine=foo=(100..500) Multiple refine parameters can be provided by adding an underscore in combination with an integer counter right behind the parameter name and a counter range 1..9. I.e. refine_1=c_refinementType=type1|type2|type3. The following system refinement attribute ids are supported: fdid: Allows to refine per single content folder id. Multiple folder ids are not supported. |
sort | Array<string> | (Optional) Parameter that represents a sorting attribute/value(s) pair. Sorting attribute id and value are separated by '='. The value describes the sort direction. Possible values are 'asc' and 'desc', for ascending or descending sort direction. I.e. sort=c_myAttribute=desc. Precondition: You have to select your sorting attributes in Business Manager > YourSite > Search Indexes > Content Index > Sorting Attributes. |
start | number | (Optional) The result set index to return the first instance for. Default value is 0. |
count | number | (Optional) The maximum number of instances per request. Default value is 25. |
locale | string | (Optional) The locale context. |
options | RequestOptions | (Optional) Override http request option. |
Returns:
Promise<PoqResponse<ContentSearchResult>>