Search profile properties
Search profiles are defined in .json format. You can configure the properties to customize the search behavior, using a set of defined providers, and pre- and post-processors.
Search profile structure
{
"indexName": "string",
"parentProfileName": "string",
"profileName": "string",
"query": {
"highlight": {
"fields": [
"name",
"fieldName"
],
"simplePre": "<strong><span class=font2>",
"simplePost": "</span></strong>"
},
"params": [
{
"paramName": "value"
}
],
"postprocessor": [
"postprocessorClass"
],
"preprocessor": [
"preprocessorClass"
],
"provider": [
"providerClass"
],
"queryFields": [
"field1",
"filed2"
],
"responseFields": [
"field1",
"filed2"
],
"sortFields": {
"key": "value"
},
"spellcheck": {
"limit": "5"
},
"group" : {
"enable" : "false",
"sort" : "score desc",
"field" : "relationship.product.group"
},
"hero" : {
"overrideFieldName" : "url.thumbnail",
"showGroupPriceRange" : "false",
"field" : {
"7741124012283334335" : "Hero"
}
}
}
}
Profile properties
The following table summarizes the configurable properties of the profiles.
Search Profile Property | Subproperty | Description |
---|---|---|
indexName | This field contains the name of the Elasticsearch index for
which the profile will be building and executing
elastic-queries. It is a mandatory field. For example :
auth.price or
live.inventory . |
|
parentProfileName | This property is used to inherit an existing profile. It is a non-mandatory parameter. | |
profileName | Name of a file containing configurable performance attributes, and one or multiple load item definitions. | |
query | maxRows | Restricts the maximum number of search results per page. The default value is 50. |
maxTimeAllowed | Restricts the maximum amount of time allowed (in milliseconds) for any query to run. If the query takes more time than specified, a timeout occurs and partial (or no) results might be returned. If the value is null, the parameter is removed from the request. The default value is 15000. | |
highlight | Declares a list of search index fields to be used for highlighting and their associated highlighting behavior at run time. | |
queryFields | This property defines the search scope (for example, Elasticsearch search fields only) for the Elasticsearch query that is being formed. | |
sortFields | Used to define sorting options for Elasticsearch queries. The
key for each field is the index_field_name and
these keys can be sent directly from the storefront to be used
in defining the sort. |
|
preprocessor | See Preprocessors. | |
postprocessor | See Postprocessors. | |
providers | See Available providers. | |
responseFields | same as solr | |
spellcheck | Defines the spell checking behavior at run time. It
contains the following parameter:
|
|
group | Defines the search result grouping behavior at run time.
|
|
hero | Defines representative grouping product behavior at run time.
This property applies when search result grouping is
enabled.
|
Available providers
Providers | Description |
---|---|
SearchBasedMerchandisingExpressionProvider | Calls the marketing component to run search rules. Search rules can apply to all searches or target-specific search keywords. They might add more constraints to the search request to influence the order of the results. They can also add new conditions to the search query with the intention of adding new products to search results. |
SearchByCategoryExpressionProvider | Handles the search by category, and considers the sales catalog in the current business context. |
SearchByManufacturerExpressionProvider | Handles the search by brand name requests. The resulting expression is added back into the SelectionCriteria object (_wcf.search.internal.meta) and to be encoded into the meta string later. |
SearchByPriceExpressionProvider | Handles the search by price range request that is generated from the Advanced Search page. The resulting expression is added back into the SelectionCriteria object (_wcf.search.internal.meta) and to be encoded into the meta string later. |
SearchByFacetExpressionProvider | Handles the search by facet request. This provider helps convert an XPath expression into a Elasticsearch expression. The resulting expression is added back into the SelectionCriteria object (_wcf.search.internal.meta) and to be encoded into the meta string later. |
SearchByStorePathExpressionProvider, SearchByStorePathAssetStoreExpressionProvider | Generates conditions to handle the store path. The resulting expression is added back into the SelectionCriteria object (_wcf.search.internal.filterquery) for other downstream processing. |
SearchByPublishedEntryOnlyExpressionProvider | Restricts search results to published entries. The resulting expression is added back into the SelectionCriteria object (_wcf.search.internal.filterquery) for other downstream processing. |
SearchByCustomExpressionProvider | Handles the search by custom expression that is stored in _wcf.search.expr. This custom expression is added to the SelectionCriteria object (_wcf.search.internal.optional.query) for other downstream processing. |
SearchTypeExpressionProvider | This search expression provider handles the match type for
keyword search requests. The following pseudo logic describes
how the match type (_wcf.search.type) can be converted into a
search criteria:
|
SearchProductSequencingExpressionProvider | Orders product entries in the search result by ranking. |
SearchCategorySequencingExpressionProvider | Sorts categories by ranking. |
SearchTermAssociationExpressionProvider | Handles the search term association (STA) expansion. This provider helps get synonyms and replace the search term to fetch the final result. The synonyms fetched by the STA service is added back into the SelectionCriteria object for other downstream processing: _wcf.search.internal.synonyms. |
SearchProductEntitlementExpressionProvider | Performs product entitlement. It is run by calling ProductEntitlementExpressionHelper to build search engine-specific query expressions for contracts that contain CatalogFilter Term Conditions and ProductSet Term Conditions. If a contract list is passed in, ProductEntitlementExpressionHelper builds the search expression against those contracts, instead of fetching contract from context. Otherwise, if no contracts are passed as parameters, this helper class fetches the current eligible contracts and builds search expressions against them. The resulting expression is added back into the SelectionCriteria object (_wcf.search.internal.filterquery) for other downstream processing. |
SearchCategoryEntitlementExpressionProvider | Performs catalog group-level entitlement by triggering a search on the Catalog Entry core. Next, it parses the facet count returned from the catalog entry core, and constructing an internal filter query on the catalog group core. The resulting expression is added back into the SelectionCriteria object (_wcf.search.internal.filterquery) for other downstream processing. |
SearchByKeywordRelevancyExpressionProvider | Handles the search by keyword request. |
SearchInventoryExpressionProvider | Handles searches for the inventory search index. |
SearchByCatalogExpressionProvider | This provider for handling the catalog context. The resulting ES expression is added back into the searchCriteria object for other downstream processing using the (_wcf.search.internal.filterquery) control parameter. |
SearchByLanguageExpressionProvider | Handles search based on language. The resulting ES expression is added back into the SelectionCriteria object (_wcf.search.internal.filterquery) for other downstream processing. |
SearchByRankingQueryProvider | This provider used for handling ranking based search. The resulting ES expression will be added back into the searchCriteria object for other downstream processing using the (_wcf.search.internal.filterquery) and (_wcf.search.rule.add) control parameter. |
SearchBySellerExpressionProvider | This provider for handling the search by seller name request. The resulting expression will be added back into the searchCriteria object for other downstream processing using the(_wcf.search.internal.meta) control parameter |
SearchChildCategoryExpressionProvider | This is the implementation of the search expression provider for handling thesearch by parent category request. The resulting ES expression will be added back into the searchCriteria object for other downstream processing using the (_wcf.search.internal.filterquery) control parameter |
SearchMultiwordFilterProviderHelper | Convert mutliword space with NNNN and add resulting searchterm back to the (_wcf.search.term) for furthure processing. |
SearchNavigationExpressionProvider | This provider calls the marketing RESTful service to run category browse rules. Note, that navigation rules can only be used with the following targets and actions: - 'Current Page' target ("Customer is viewing a category" behaviour only) - 'Customer Segment' target (for explicit customer segments only) - 'Change Search Result Order' action All other targets and actions are not supported. |
SearchWorkspaceExpressionProvider | Handles the search by workspace .The resulting ES expression is added back into the SelectionCriteria object (_wcf.search.internal.filterquery) for other downstream processing. |
Preprocessors
Preprocessor | Description |
---|---|
SearchRelevancyByProductGroupingQueryPreprocessor | When hero search grouping or browsing is enabled , this preprocessor includes aggregation and collapse in elastic search query builder. |
Postprocessors
Postprocessor | Description |
---|---|
SearchCatalogEntryViewAttachmentsQueryPostprocessor | Reformat the response into a structured object. It populates the Attachments list into the catalogEntryView part of the response. The mapping configuration is defined in wc-component.json file under the XPathToAttachmentsBODResponseFieldNameMapping section. This postprocessor does a sub-search query to retrieve the catalog entry associated assets. It uses the IBM_findCatalogEntryAssociatedAssets search profile. |
SearchCatalogEntryViewAttributesQueryPostprocessor | Reformat the response into a structured object. It populates the Attributes list, and Attributes values list into the catalogEntryView part of the response. The mapping configuration is defined in wc-component.json file under the XPathToAttributesBODResponseFieldNameMapping and XPathToAttributesValuesBODResponseFieldNameMapping sections. |
SearchCatalogEntryViewComponentsQueryPostprocessor | Reformat the response into a structured object. It populates the Components list into the catalogEntryView part of the response. The mapping configuration is defined in wc-component.json file under the XPathToComponentsBODResponseFieldNameMapping section. This postprocessor, does a sub search query to retrieve the catalog entry associated components. It uses the IBM_findCatalogEntryComponentssearch profile. |
SearchCatalogEntryViewMerchandisingAssocQueryPostprocessor | Reformat the response into a structured object. It populates the merchandisingAssociationslist into the catalogEntryView part of the response. The mapping configuration is defined in wc-component.json file under the XPathToMerchandisingAssociationsBODResponseFieldNameMapping section. This post processor issues a database query to retrieve catalog entry associated merchandising identifiers, then does a sub search query to retrieve the actual associated merchandising details. It uses the IBM_findCatalogEntryAssociatedMerchandising search profile and the IBM_GET_MERCHANDISING_ASSOCIATIONS_BY_CATALOG_ENTRY_ID query template that is defined in the wc-query-utilities.tpl file. |
SearchBrandSuggestionQueryPostprocessor | A search query postprocessor for handling brand suggestion. |
SearchCategorySuggestionQueryPostprocessor | A search query postprocessor for handling category suggestion. |
SearchFacetQueryPostprocessor | Attach facet-related response to data. |
SearchChildCategoryEntitlementQueryPostprocessor | Remove unentitled child catgroupId from the DocumentList in the response. |
SearchCategoryEntitlementQueryPostprocessor | Remove the specified category document from the DocumentList in the response. |
SearchBreadCrumbTrailQueryPostprocessor | Generate the breadcrumb trail. |
SearchEntitlementQueryPostprocessor | Put catgroup_id_search facet information into the SearchResponse. |
SearchSpellCheckSuggestionQueryPostprocessor | Reformat the spell correction feedback into a more readable list of keywords. |
SearchCatalogGroupViewUserDataQueryPostprocessor | Add custom index fields to the search response for category view resource. |
SearchRelevancyByProductGroupingPostprocessor | A search query postprocessor for handling result grouping configurations. |
SearchBrowseRelevancyByProductGroupingPostprocessor | Selects one Elasticsearch document from each group and makes a second call to find the group owner product and creates search hits to be consumed by other postprocessors. Then, the result is returned in the final REST response. |
SearchCatalogEntrySuggestionQueryPostprocessor | Reformat the ES response into a structured object from catalogEntryView and populates suggestionView part of the response. The mapping configuration is defined in wc-component.json file under the XPathToCategoryViewBODResponseFieldNameMapping section. |
SearchCatalogEntryViewImagesQueryPostProcessor | A search query postprocessor for handling for all image related fields. |
SearchCatalogEntryViewPriceQueryPostprocessor | Reformat the response into a structured object. It populates the price list into the catalogEntryView part of the response. The mapping configuration is defined in wc-component.json file under the XPathToPriceBODResponseFieldNameMapping section. |
SearchCatalogEntryViewUserDataQueryPostprocessor | A search query post-processor for adding custom fields into the response. |
SearchCatalogEntryViewUserDataQueryPostprocessor | A search query post-processor for adding custom fields into the response. |
SearchRankingQueryPostProcessor | Resequence the ES response based on the ranking details and also includes it in response metadata field "rankings." |
SearchKeywordSuggestionQueryPostprocessor | A search query post-processor for handling keyword suggestions. |
SearchSellerSuggestionQueryPostprocessor | A search query post-processor for handling seller suggestions. |
SearchV2ContentPageQueryPostProcessor | A search query post-processor to add layout section for content pages in the URL service response. |
V2UrlAssetStorePostProcessor V2UrlPostProcessor |
A search query post-processor restructure v2 URL API response. |
SearchV2UrlUserDataQueryPostProcessor | A search query post-processor for adding custom fields into the response. |