Configuring Query services in ZooKeeper
You can build profiles for Ingest service customizations in ZooKeeper. Endpoints for configuring both development and production environment customizations are available. Note that these endpoints are available from within the Data environment and Development environment only. They are not available for the shopper to use through the Query service in either the Commerce Authoring or Live environment.
About this task
ZooKeeper is used to store your custom configurations. At runtime, each microservice polls ZooKeeper for any custom configurations it may also have stored. It will automatically override default behaviours such as query replies, and load custom applications such as new NiFi connectors. This task describes how to set up profiles in ZooKeeper, as well as specific custom search options such as units of measure and product colors. You define endpoints for the REST API so that these customizations are accessible through the gateway.
Procedure
-
Set up your profiles.
ZooKeeper stores named profiles in one of its nodes. You can create, update, delete the profiles, and get profiles using the profiles endpoint of the Query service. The endpoint for the profile is:
No container needs to be restarted after you add a profile using this endpoint.https://data_environment_hostname:30921/search/resources/api/v2/documents/profiles/profileName
For the full REST API specification, see the Query REST API.
Each profile document is in .json format and has the following structure.
For definitions of the fields and descriptions of the available providers, pre- and post-processors, see Search profile properties.{ "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" } } } }
-
Configure specific Search customizations.
The /configuration endpoint is used to add the customized configuration details in ZooKeeper node. There is a root node in ZooKeeper with the name /configuration, and inside the root node are child nodes where you can add the configuration. The available nodes are:
- xC cextensions
- wc-component
- Colors, organized by language
- Filters to aid in natural language processing
- Units of measure, and
- Relevancy