Section |
---|
This document defines the available Hierarchy API methods available for Hawksearch version 4.0 and the associated objects. This documentation is intended for clients’ development teams to create and maintain the Hawksearch v4.0 indexes. Table of Contents
DomainsHawksearch has three environments available: Development, Test and a load-balanced Production. When using the search API methods in this document, the following domains can be used to access each environment after your engine has been set-up in that environment. Developmentindexing-dev.hawksearch.net/ Configurations for an engine in this location are maintained in the Hawksearch Workbench at dev.hawksearch.net. Testindexing-test.hawksearch.net/ Configurations for an engine in this location are maintained in the Hawksearch Workbench at test.hawksearch.net. Productionindexingapi-na.hawksearch.com/ Configurations for an engine in this location are maintained in the Hawksearch Workbench at manage.hawksearch.com.
|
...
The Upsert method is used to insert hierarchy records. The hierarchy records are often categories or departments. There is a limit of 125 hierarchy objects that can be sent in a request. This method can be called multiple times to accommodate more than 125. After all hierarchy objects have been sent, the hierarchy/rebuild method can be used.
Expand |
---|
|
Endpoint | Method | Header Key |
---|
api/hierarchy/upsert | POST | Content-Type: application/json |
|
Expand |
---|
|
Name | Data Type | Required | Description |
---|
IndexName | string | required | Name of the index in which the hierarchy is being built | Hierarchies | Array of objects | required | See Hierarchy Object section. |
|
Rebuild
The Rebuild method is used to initialize hierarchy mapping.
Expand |
---|
|
Endpoint | Method | Header Key |
---|
api/hierarchy/rebuild | POST | Content-Type: application/json |
|
Expand |
---|
|
Name | Data Type | Required | Description |
---|
IndexName | string | required | Name of the index in which the hierarchy is being built |
|
Delete All
The method removes all hierarchy items. After all hierarchy objects have been removed, the hierarchy/rebuild method can be used.
Expand |
---|
|
Endpoint | Method | Header Key |
---|
api/hierarchy/delete-all | POST | Content-Type: application/json |
|
Expand |
---|
|
Name | Data Type | Required | Description |
---|
IndexName | string | required | Name of the index in which the hierarchy is being built |
|
Delete Items
The Delete Items method removes multiple documents from a specific hierarchy based on ids. After hierarchy objects have been removed, the hierarchy/rebuild method can be used.
Expand |
---|
|
Endpoint | Method | Header Key |
---|
api/hierarchy/delete-items | POST | Content-Type: application/json |
|
Expand |
---|
|
Name | Data Type | Required | Description |
---|
IndexName | string | required | Name of the index in which the hierarchy is being built | Ids | Array of strings | required | Each string contains the document id of an item that suppose to be delete |
|
Retrieve Hierarchy
This method can be used to verify the hierarchy that has been created.
Expand |
---|
|
Endpoint | Method | Header Key |
---|
api/hierarchy/ | POST | Content-Type: application/json |
|
Expand |
---|
|
Name | Data Type | Required | Description |
---|
IndexName | string | required | Name of the index from which to retrieve hierarchy |
|
Expand |
---|
|
Object | Data Type | Description |
---|
Mapping | Array of strings | The object encapsulating the mapping information | > Field | String | Field name used in the hierarchy | > Path | String | A slash-separated value indicating the nested hierarchy | > Code | String | SEO friendly code for the hierarchy | > Label | String | Display label of the hierarchy | Field | String | Field name used in the hierarchy | Value | String | Facet value | Url | String | Url of the page representing the hierarchy (optional) | ImageUrl | String | Url of the image representing the hierarchy (optional) |
|
Objects
Table of Content Zone |
---|
maxLevel | 2 |
---|
minLevel | 2 |
---|
indent | 30px |
---|
location | top |
---|
type | flat |
---|
printable | false |
---|
separator | pipe |
---|
|
Anchor |
---|
| HierarchyObject |
---|
| HierarchyObject |
---|
|
Hierarchy Object
Align |
---|
align | justify |
---|
title | Description |
---|
| Description Object | Data Type | Always | Description |
---|
HierarchyId | String | Yes | Unique identifier for the hierarchy entry | Name | String | Yes | Display name for the hierarchy entry | ParentHierarchyId | String | Yes | The HierarchyId of the parent hierarchy for this hierarchy entry. If this hierarchy entry is a top-level, the value passed should be "0". | IsActive | Boolean | No | Indicates if the hierarchy entry is active and should be displayed. It is not required to send inactive hierarchies, but some product systems generate them for sending. | SortOrder | Number | No | Integer to use for sorting the hierarchy entries for display | Custom | String | No | Placeholder for custom implementation use |
|
|
...