Anchor |
---|
| PaginationObject |
---|
| PaginationObject |
---|
|
A pagination object will always be returned in the response from the Search method, even if there are 0 results. Pagination settings can be configured in the Hawksearch Workbench. The configurations include how many results appear per page, the default number per page and the display value for the user. Expand |
---|
|
Object | Data Type | Always | Description |
---|
NoOfResults | Number | Yes | Number of total items in the result set. | CurrentPage | Number | Yes | The page number returned | MaxPerPage | Number | Yes | The number of items returned for the page Entering 0 in the request will return only facets, no documents. See example | NoOfPages | Number | Yes | The total number of pages for the result set (with the current MaxPerPage) | Items | Array of objects | Yes | Set of pagination options | > Label | String | Yes | Display label for user’s pagination option (i.e. 24 per page) | > PageSize | Number | Yes | Maximum number of items that will be returned per page when this option is selected. | > Selected | Boolean | Yes | True or false, indicating if this is the option selected. Only 1 Pagination Item will have Selected=true. | > Default | Boolean | Yes | True or false, indicating if this is the default option. Only 1 Pagination Item will have Selected=true. | IsShowFirstLink | Boolean | Yes | True or false, indicating if a link to the first page should be displayed. This is configured Workbench > Data Configuration > Sorting/Pagination > Show First Link | IsShowLastLink | Boolean | Yes | True or false, indicating if a link to the last page should be displayed. This is configured Workbench > Data Configuration > Sorting/Pagination > Show Last Link | NumberOfPagesLink | Number | Yes | This is the number of page links that should be displayed to the user. This is configured Workbench > Data Configuration > Sorting/Pagination > Number of Page Links |
|
Expand |
---|
| Example 10.1 An object in a response with no results: "Pagination": {
"NofResults": 0,
"CurrentPage": 1,
"MaxPerPage": 12,
"NofPages": 1,
"Items": [
{
"Label": "12 Items Per Page",
"PageSize": 12,
"Selected": true,
"Default": true
},
{
"Label": "24 Items Per Page",
"PageSize": 24,
"Selected": false,
"Default": false
},
{
"Label": "36 Items Per Page",
"PageSize": 36,
"Selected": false,
"Default": false
}
]
}
Example 10.2 An object in a response with results "Pagination": {
"NofResults": 91,
"CurrentPage": 1,
"MaxPerPage": 12,
"NofPages": 7,
"Items": [
{
"Label": "12 Items Per Page",
"PageSize": 12,
"Selected": true,
"Default": true
},
{
"Label": "24 Items Per Page",
"PageSize": 24,
"Selected": false,
"Default": false
},
{
"Label": "36 Items Per Page",
"PageSize": 36,
"Selected": false,
"Default": false
}
]
}
|
Anchor |
---|
| ResultsObject |
---|
| ResultsObject |
---|
|
Results ObjectThe Results Object is returned in the Search method and the Autocomplete method. Expand |
---|
|
Object | Data Type | Always | Description |
---|
Results | Array of objects | Yes | An entry in the array for each item returned in search results. | DocId | String |
| Value of the unique key | Score | Number |
| The relevancy score that has been calculated by the Hawksearch engine. | Document | Contains properties |
| Contains the fields assigned to each item. This is driven by the fields defined in Hawksearch Workbench. | BestFragment | String |
| The Best Fragment feature creates synopsis of a larger field that can be used for display. The types of field that utilized this feature are: Long Description, Title, Content (body content), or Name. This is configured in Workbench > Data Configuration > Fields | IsPin | Boolean |
| True or false, indicating if the record has been pinned into its place. Pinning is configured in Preview or in Workbench > Merchandising > Item Pinning |
|
Expand |
---|
| Example 11.1The values in the Document object will vary. This is dependent on the fields that are configured in your Hawksearch engine workbench, and the fields that are flagged to be included in the results. {
"DocId": "Item_119547",
"Score": 775.7318,
"Document": {
"image": [
"http://test.hawksearch.net/assets/1/14/DimThumbnail/Womens-Trabagon-Rain-Jacket-Watermelon.jpg"
],
"itemname": [
"Women's Trabagon Rain Jacket"
],
"isonsale": [
"Yes"
],
"size-property": [
"Small",
"Medium",
"Large",
"Extra Large"
],
"color-property": [
"Black",
"Blue",
"Red",
"Pink",
"Green"
],
"itemtypeid": [
"3"
],
"saleprice": [
"+0000000000000039.9700"
],
"rating": [
"+0000000000000003.0000"
],
"type": [
"Item"
],
"url": [
"/details.aspx?itemid=Item_119547"
],
"ratingrange": [
"+0000000000000003.0000"
],
"imagealttag": [
"Womens-Trabagon-Rain-Jacket-Watermelon"
],
"subdepartmentpath": [
"1|Summer Sale",
"1|Specials",
"1|Women",
"1|Sale"
],
"price": [
"+0000000000000060.0000"
],
"department_nest": [
"1|Summer Sale",
"2|Summer Sale/Women",
"3|Summer Sale/Women/Jackets",
"1|Women",
"2|Women/Jackets",
"3|Women/Jackets/Casual Jackets",
"3|Women/Jackets/Rain Jackets",
"1|Specials",
"2|Specials/Sat Dec 15th",
"3|Specials/Sat Dec 15th/Kids",
"3|Specials/Sat Dec 15th/Women's"
],
"id": [
"Item_119547"
],
"sku": [
"\r\n "
],
"brand": [
"White Sierra"
]
}
}
|
Anchor |
---|
| SelectionsObject |
---|
| SelectionsObject |
---|
|
Selections ObjectThe Selections Object may be contained in the response from the Search method. Expand |
---|
|
Object | Data Type | Always | Description |
---|
Selections | Set of objects | Yes | Will contain an entry for each facet that has one or more selections. Will be empty if no facet selections have been made. | > [field name of facet] |
|
|
| >> Label | String |
| Display name for facet | >> Items | Array of objects |
| Will contain an entry for each selection made within the facet. | >>> Label | String |
| Display label for facet value | >>> Value | String |
| Value for facet value. If this is an OpenRange type of facet, this string holds the lower and upper bounds that were entered. See Example 12.2 below. |
|
Expand |
---|
| Example 12.1 "Selections": {
"brand": {
"Label": "Brand",
"Items": [
{
"Label": "Marmot",
"Value": "Marmot"
},
{
"Label": "Columbia Sportswear",
"Value": "Columbia Sportswear"
}
]
},
"isonsale": {
"Label": "On Sale",
"Items": [
{
"Label": "Yes",
"Value": "Yes"
}
]
}
}
Example 12.2 "Selections": {
"zip_postal_code_range": {
"Label": "Postal Code",
"Items": [
{
"Label": "ba3,bl6",
"Value": "ba3,bl6"
}
]
}
}
|
Anchor |
---|
| SortingObject |
---|
| SortingObject |
---|
|
Sorting ObjectThe Sorting Object may be contained in the response from the Search method. Expand |
---|
|
Object | Data Type | Always | Description |
---|
Items | Array of objects | Yes |
| > Label | String | Yes | Name of the sorting option. This is the label to display to users. | > Value | String | Yes | The value to be used to specify the sort order once user selects it. This value is passed in the SortBy object in the Search method. | > IsDefault | Boolean | Yes | Indicates if this sorting option was configured to be the default. | > Selected | Boolean | Yes | Indicates if this sorting option is currently being used for the current result set. |
|
Expand |
---|
| Example 13.1The sorting options returned depend on the configuration in the Hawksearch Workbench > Data Configuration > Sorting/Pagination. "Sorting": {
"Items": [
{
"Label": "Best Match",
"Value": "score",
"IsDefault": true,
"Selected": true
},
{
"Label": "Title (A-Z)",
"Value": "titleasc",
"IsDefault": false,
"Selected": false
},
{
"Label": "Title (Z-A)",
"Value": "titledesc",
"IsDefault": false,
"Selected": false
},
{
"Label": "Price: Lowest to Highest",
"Value": "salepriceasc",
"IsDefault": false,
"Selected": false
},
{
"Label": "Price: Highest to Lowest",
"Value": "salepricedesc",
"IsDefault": false,
"Selected": false
}
]
}
|
Anchor |
---|
| MerchandisingObject |
---|
| MerchandisingObject |
---|
|
Merchandising ObjectMerchandising can be placed by using Campaigns in the Hawksearch Workbench. The Campaign will determine if the content should appear and in what zone. The Merchandising Object may be contained in the response from the Search method. Expand |
---|
|
Object | Data Type | Always | Description |
---|
Merchandising | Array of objects | Yes |
| > Items | Array of objects | Yes |
| >> Zone | String | Yes | The name of the zone in which the content should be placed. The zone names are configured in the Hawksearch Workbench > Merchandising > Campaigns > Zones | >> Title | String | Yes | The title of the Campaign that is triggering this content to appear. Not intended to display to the user. | >> CampaignId | Integer | Yes | The id of the Campaign that is triggering this content to appear. Not intended to display to the user. | >> BannerId | Integer | Yes | The id of the Banner that is triggering this content to appear. Not intended to display to the user. | >> ContentType | String | Yes | Value can be “image,” “custom,” or “widget.” (Further custom programming required to use the “widget” type.) | >> ImageUrl | String | No | If ContentType=image, this holds the url where the image is located. | >> AltTag | String | No | If ContentType=image, this may be included with the value to be used as the Alt Tag value. | >> ForwardUrl | String | No | If ContentType=image, this may be included. If present, the image should be linkable to the URL provided in the ForwardUrl object. | >> Output | String | No | If ContentType=custom, the Output object will contain the HTML to display. | >> IsMobile | Boolean | Yes | Indicates of this content piece was flagged for mobile in the Workbench > Merchandising > Content Items | >> MobileContentType | String | No | Value can be “image,” “custom,” or “widget.” (Further custom programming required to use the “widget” type.) It will be sent if the IsMobile object is True. | >> MobileImageUrl | String | No | If MobileContentType=image, this holds the url where the image is located. | >> MobileWidgetArgs | String | No | Reserved for the ContentType=widget. (Further custom programming required to use the “widget” type.) | >> IsTrackingEnabled | Boolean | Yes | Indicates of this content piece was flagged to have tracking enabled in the Workbench > Merchandising > Content Items | >> MobileIsTrackingEnabled | Boolean | Yes | Indicates if this content piece was flagged to have tracking enabled for mobile in the Workbench > Merchandising > Content Items | >> Target | String | No | If the Target setting on the content item is “same window,” this object will not be included in the response. If the Target setting on the content item is “new window,” this object will hold a string, “_blank”. | >> MobileAltTag | String | No | If MobileContentType=image, this may be included with the value to be used as the Alt Tag value. | >> MobileForwardUrl | String | No | If MobileContentType=image, this may be included. If present, the image should be linkable to the URL provided in the MobileForwardUrl object. | >> MobileWidth | String | No | Width of image provided in MobileImageUrl. | >> MobileHeight | String | No | Height of image provided in MobileImageUrl. | >> MobileTarget | String | No | If the Mobile Target setting on the content item is “same window,” this object will not be included in the response. If the Mobile Target setting on the content item is “new window,” this object will hold a string, “_blank”. | >> IsTablet | Boolean | Yes | Indicates of this content piece was flagged for tablet in the Workbench > Merchandising > Content Items | >> TabletContentType | String | No | Value can be “image,” “custom,” or “widget.” (Further custom programming required to use the “widget” type.) It will be sent if the IsTablet object is True. | >> TabletImageUrl | String | No | If TabletContentType=image, this holds the url where the image is located. | >> TabletIsTrackingEnabled | Boolean | No | Indicates if this content piece was flagged to have tracking enabled for tablet in the Workbench > Merchandising > Content Items | >> TabletAltTag | String | No | If TabletContentType=image, this may be included with the value to be used as the Alt Tag value. | >> TabletForwardUrl | String | No | If TabletContentType=image, this may be included. If present, the image should be linkable to the URL provided in the TabletForwardUrl object. | >> TabletWidth | String | No | Width of image provided in TabletImageUrl. | >> TabletHeight | String | No | Height of image provided in TabletImageUrl. | >> TabletTarget | String | No | If the Tablet Target setting on the content item is “same window,” this object will not be included in the response. If the Tablet Target setting on the content item is “new window,” this object will hold a string, “_blank”. | >> TabletOutput | String | No | If ContentType=custom, the Output object will contain the HTML to display. | >> TabletWidgetArgs | String | No | Reserved for the ContentType=widget. (Further custom programming required to use the “widget” type.) |
|
Expand |
---|
| Example 14.1 { "Zone": "Bottom", "Title": "Free Shipping", "ContentType": "image", "ImageUrl": "http://dev.hawksearch.net/sites/elasticdemo//assets/1168/FreeShipping.jpg", "AltTag": "Free Shipping", "ForwardUrl": "http://www.google.com", "IsMobile": false, "IsTrackingEnabled": true, "MobileIsTrackingEnabled": false, "CampaignId": 12345, "BannerId": 67890, "IsTablet": false } Example 14.2 { "Zone": "LeftBottom", "Title": "Popular Tags", "ContentType": "widget", "Output": [ { "keyword": "jacket", "count": 41 }, { "keyword": "test", "count": 40 }, { "keyword": "keen", "count": 21 } ], "IsMobile": false, "IsTrackingEnabled": false, "CampaignId": 12345, "BannerId": 67890, "IsTablet": false } |
Anchor |
---|
| FeaturedItems |
---|
| FeaturedItems |
---|
|
Featured Items ObjectThe Featured Items Object may be contained in the response from the Search method. Expand |
---|
|
Object | Data Type | Always | Description |
---|
FeaturedItems | Array of objects | Yes |
| > Items | Array of objects | Yes |
| >> Zone | String | Yes | The name of the zone in which the content should be placed. The zone names are configured in the Hawksearch Workbench > Merchandising > Campaigns > Zones | >> Title | String | Yes | The title of the Campaign that is triggering this content to appear. Not intended to display to the user. | >> CampaignId | Integer | Yes | The id of the Campaign that is triggering this content to appear. Not intended to display to the user. | >> BannerId | Integer | Yes | The id of the Banner that is triggering this content to appear. Not intended to display to the user. | >> ContentType | String | Yes | Value can be “image,” “custom,” or “widget.” (Further custom programming required to use the “widget” type.) | >> ImageUrl | String | No | If ContentType=image, this holds the url where the image is located. | >> AltTag | String | No | If ContentType=image, this may be included with the value to be used as the Alt Tag value. | >> ForwardUrl | String | No | If ContentType=image, this may be included. If present, the image should be linkable to the URL provided in the ForwardUrl object. | >> Output | String | No | If ContentType=custom, the Output object will contain the HTML to display. | >> IsMobile | Boolean | Yes | Indicates of this content piece was flagged for mobile in the Workbench > Merchandising > Content Items | >> MobileContentType | String | No | Value can be “image,” “custom,” or “widget.” (Further custom programming required to use the “widget” type.) It will be sent if the IsMobile object is True. | >> MobileImageUrl | String | No | If MobileContentType=image, this holds the url where the image is located. | >> MobileWidgetArgs | String | No | Reserved for the ContentType=widget. (Further custom programming required to use the “widget” type.) | >> IsTrackingEnabled | Boolean | Yes | Indicates of this content piece was flagged to have tracking enabled in the Workbench > Merchandising > Content Items | >> MobileIsTrackingEnabled | Boolean | Yes | Indicates if this content piece was flagged to have tracking enabled for mobile in the Workbench > Merchandising > Content Items | >> Target | String | No | If the Target setting on the content item is “same window,” this object will not be included in the response. If the Target setting on the content item is “new window,” this object will hold a string, “_blank”. | >> MobileAltTag | String | No | If MobileContentType=image, this may be included with the value to be used as the Alt Tag value. | >> MobileForwardUrl | String | No | If MobileContentType=image, this may be included. If present, the image should be linkable to the URL provided in the MobileForwardUrl object. | >> MobileWidth | String | No | Width of image provided in MobileImageUrl. | >> MobileHeight | String | No | Height of image provided in MobileImageUrl. | >> MobileTarget | String | No | If the Mobile Target setting on the content item is “same window,” this object will not be included in the response. If the Mobile Target setting on the content item is “new window,” this object will hold a string, “_blank”. | >> IsTablet | Boolean | Yes | Indicates of this content piece was flagged for tablet in the Workbench > Merchandising > Content Items | >> TabletContentType | String | No | Value can be “image,” “custom,” or “widget.” (Further custom programming required to use the “widget” type.) It will be sent if the IsTablet object is True. | >> TabletImageUrl | String | No | If TabletContentType=image, this holds the url where the image is located. | >> TabletIsTrackingEnabled | Boolean | No | Indicates if this content piece was flagged to have tracking enabled for tablet in the Workbench > Merchandising > Content Items | >> TabletAltTag | String | No | If TabletContentType=image, this may be included with the value to be used as the Alt Tag value. | >> TabletForwardUrl | String | No | If TabletContentType=image, this may be included. If present, the image should be linkable to the URL provided in the TabletForwardUrl object. | >> TabletWidth | String | No | Width of image provided in TabletImageUrl. | >> TabletHeight | String | No | Height of image provided in TabletImageUrl. | >> TabletTarget | String | No | If the Tablet Target setting on the content item is “same window,” this object will not be included in the response. If the Tablet Target setting on the content item is “new window,” this object will hold a string, “_blank”. | >> TabletOutput | String | No | If ContentType=custom, the Output object will contain the HTML to display. | >> TabletWidgetArgs | String | No | Reserved for the ContentType=widget. (Further custom programming required to use the “widget” type.) | >> Items | Array of objects | Yes |
| >>> DocId | String | Yes | Value of the unique key | >>> Score | Number | Yes | The relevancy score that has been calculated by the Hawksearch engine. This is not relevant for the product spotlighting. (The same object structure as Results is used.) | >>> Document | Array of objects | Yes | Contains the fields assigned to each item. This is driven by the fields defined in Hawksearch Workbench. |
|
Expand |
---|
| Example 15.1 "FeaturedItems": { "Items": [ { "Zone": "Top", "Title": "Our Best Rated Jackets", "ContentType": "featured", "IsMobile": false "IsTrackingEnabled": false, "MobileIsTrackingEnabled": false, "CampaignId": 12345, "BannerId": 67890, "Items": [ { "DocId": "Item_73519", "Score": 1, "Document": { "image": [ "http://test.hawksearch.net/assets/1/14/DimThumbnail/Patagonia-Womens-Re-Tool-Snap-T-Fleece-Pullover-Tailored-Grey-w-Shock-Pink.jpg" ], "itemname": [ "Women's Re-Tool Snap-T® Fleece Pullover" ], "isonsale": [ "No" ], "size-property": [ "Extra Small", "Small", "Medium", "Large", "Extra Large" ], "color-property": [ "Black", "Red", "Green", "Blue", "Pink", "Grey" ], "itemtypeid": [ "3" ], "saleprice": [ "+0000000000000119.0000" ], "rating": [ "+0000000000000005.0000" ], "type": [ "Item" ], "url": [ "/details.aspx?itemid=Item_73519" ], "ratingrange": [ "+0000000000000005.0000" ], "imagealttag": [ "Patagonia-Womens-Re-Tool-Snap-T-Fleece-Pullover-Tailored-Grey-w-Shock-Pink" ], "subdepartmentpath": [ "1|Specials", "1|Summer Sale", "1|Women" ], "price": [ "+0000000000000119.0000" ], "department_nest": [ "1|Women", "2|Women/Jackets", "3|Women/Jackets/Fleece Jackets", "1|Summer Sale", "2|Summer Sale/Women", "3|Summer Sale/Women/Jackets", "1|Specials", "2|Specials/Sat Dec 15th", "3|Specials/Sat Dec 15th/Women's", "2|Summer Sale/Packs", "3|Summer Sale/Packs/Backpacking Packs", "3|Specials/Sat Dec 15th/Kids" ], "id": [ "Item_73519" ], "sku": [ "\r\n " ], "brand": [ "Patagonia" ] } },
{
"DocId": "Item_74040",
"Score": 1,
"Document": {
"image": [
"http://test.hawksearch.net/assets/1/14/DimThumbnail/White-Sierra-Youth-Trabagon-Rain-Jkt-vivid-bright-yellow.jpg"
],
"itemname": [
"Trabagon Rain Jacket / Youth"
],
"isonsale": [
"Yes"
],
"size-property": [
"Extra Small",
"Small",
"Medium",
"Large",
"Extra Large"
],
"color-property": [
"Black",
"Blue",
"Orange",
"Red",
"Pink"
],
"itemtypeid": [
"3"
],
"saleprice": [
"+0000000000000032.9700"
],
"rating": [
"+0000000000000005.0000"
],
"type": [
"Item"
],
"url": [
"/details.aspx?itemid=Item_74040"
],
"ratingrange": [
"+0000000000000005.0000"
],
"imagealttag": [
"White-Sierra-Youth-Trabagon-Rain-Jkt-vivid-bright-yellow"
],
"subdepartmentpath": [
"1|Summer Sale",
"1|Sale",
"1|Specials",
"1|Kids"
],
"price": [
"+0000000000000055.0000"
],
"department_nest": [
"1|Kids",
"2|Kids/Girls 5-20",
"3|Kids/Girls 5-20/Jackets",
"2|Kids/Boys 5-20",
"3|Kids/Boys 5-20/Jackets",
"1|Specials",
"2|Specials/Sun Dec 23rd",
"3|Specials/Sun Dec 23rd/Girls 5-20",
"3|Specials/Sun Dec 23rd/Boys 5-20",
"2|Specials/Sat Dec 15th",
"3|Specials/Sat Dec 15th/Kids",
"2|Specials/Sat Dec 8th",
"3|Specials/Sat Dec 8th/Girl's",
"3|Specials/Sat Dec 8th/Boy's",
"1|Summer Sale",
"2|Summer Sale/Kids",
"3|Summer Sale/Kids/Girls 5-20",
"3|Summer Sale/Kids/Boys 5-20",
"2|Summer Sale/Packs",
"3|Summer Sale/Packs/Backpacking Packs"
],
"id": [
"Item_74040"
],
"sku": [
"\r\n "
],
"brand": [
"White Sierra"
]
}
}]}} |
Anchor |
---|
| ClientDataObject |
---|
| ClientDataObject |
---|
|
Client Data ObjectThis object may be contained in the response from the Search method and Autocomplete method. Expand |
---|
|
Object | Data Type | Required | Description | Notes |
---|
VisitorId | String | Yes | This is visitor id that is used for tracking. |
| Custom | String | Optional | Can be used to send information used for evaluating Visitor Targets. | This is what was previously called ‘hawkcustom.’ The value can be used to trigger a Visitor Target as configured in Workbench > Merchandising > Visitor Tagets. | HttpTrueClientIp | String | Optional | Client IP used for evaluating Visitor Targets. | Should contain the IP address of end user that has made a request for search | UserAgent | String | Optional | Browser user agent used for evaluating Visitor Targets. | Should contain the user agent of end user that has made a request for search | Source | String | Optional | Source used for evaluating Visitor Targets. | This was previously called ‘hawksource.’ Can be used to track the source the user came from (i.e. email, Instagram, etc) | > Origin | Origin Object | Optional | Coordinates to provide current location. |
| ZipCode | String | Optional | This parameter is used for zip code search tracking. |
|
|
Expand |
---|
| Example 16.1 "ClientData":{
"VisitorId" : "2F87556F-AA2F-438E-A52C-AFF4B7E10EB5",
"Custom" : {"some key" : "some value"},
"HttpTrueClientIp" : "68.72.70.2",
"UserAgent" : "some agent",
"Source" : ""
}
|
Expand |
---|
title | Example of selecting a Language |
---|
|
Info |
---|
Prerequisite : A Visitor target rule needs to be defined as: 'Language is en'
|
ClientData request:
"ClientData":{
"Custom" : {"language" : "en"}
}
Search response:
"VisitorTargets":[
{
"Id" : "10805",
"Name" : "English"
}
]
|
Expand |
---|
title | Example of selecting a Custom field |
---|
|
Info |
---|
Prerequisite : A Visitor target rule needs to be defined as: 'Custom is product'
|
ClientData request:
"ClientData":{
"Custom" : {"custom" : "Products"}
}
Search response:
"VisitorTargets":[
{
"Id" : "12345",
"Name" : "Products"
}
]
|
Anchor |
---|
| ProductsObject |
---|
| ProductsObject |
---|
|
Products ObjectThis object is contained in the response from the Autocomplete method. Expand |
---|
|
Object | Data Type | Always | Description |
---|
Products | Array of objects | Yes |
| > ProductName | String | Yes | Name of the item (if applicable) | > Sku | String | Yes | Sku of the item (if applicable) | > Thumb | String | Yes | URL of image of the item (if applicable) | > Url | String | Yes | URL of product page (if applicable) | > Html | String | Yes | HTML to display the item in autocomplete. | > Results | Array of objects | No | This will only be populated if the parameter, DisplayFullResponse, is sent in with ‘true’ as a value. See the Results Object section. |
|
Expand |
---|
| Example 17.1 This example shows the products in the response when DisplayFullResponse was set to “false.” "Products": [
{
"ProductName": "Jack Rabbit SL2 Footprint",
"Sku": "16161093019000",
"Thumb": "<img class='hawk-sqItemImage-thumb' src='http://test.hawksearch.net/assets/1/14/DimThumbnail/Big_Agnes_Jack_Rabbit_SL2_Footprint.png' />",
"Url": "http://dev.hawksearch.net/sites/elasticdemo//details.aspx?itemid=Item_153223",
"Html": "<div class=\"hawk-sqItemImage\" ><img class='hawk-sqItemImage-thumb' src='http://test.hawksearch.net/assets/1/14/DimThumbnail/Big_Agnes_Jack_Rabbit_SL2_Footprint.png' /></div>\r\n<div class=\"hawk-sqItemContent\">\r\n<h1 class=\"hawk-sqItemName\">Jack Rabbit SL2 Footprint</h1>",
"Results": {
"Score": 0
}
},
{
"ProductName": "Men's Jack SS Polo",
"Sku": "\r\n ",
"Thumb": "<img class='hawk-sqItemImage-thumb' src='http://test.hawksearch.net/assets/1/14/DimThumbnail/Jack-SS-Polo_Nightsky.jpg' />",
"Url": "http://dev.hawksearch.net/sites/elasticdemo//details.aspx?itemid=Item_140273",
"Html": "<div class=\"hawk-sqItemImage\" ><img class='hawk-sqItemImage-thumb' src='http://test.hawksearch.net/assets/1/14/DimThumbnail/Jack-SS-Polo_Nightsky.jpg' /></div>\r\n<div class=\"hawk-sqItemContent\">\r\n<h1 class=\"hawk-sqItemName\">Men's Jack SS Polo</h1>",
"Results": {
"Score": 0
}
},
{
"ProductName": "Boot Jack 25 Downtek",
"Sku": "\r\n ",
"Thumb": "<img class='hawk-sqItemImage-thumb' src='http://test.hawksearch.net/assets/1/14/DimThumbnail/Boot-Jack-24-zm.jpg' />",
"Url": "http://dev.hawksearch.net/sites/elasticdemo//details.aspx?itemid=Item_162525",
"Html": "<div class=\"hawk-sqItemImage\" ><img class='hawk-sqItemImage-thumb' src='http://test.hawksearch.net/assets/1/14/DimThumbnail/Boot-Jack-24-zm.jpg' /></div>\r\n<div class=\"hawk-sqItemContent\">\r\n<h1 class=\"hawk-sqItemName\">Boot Jack 25 Downtek</h1>",
"Results": {
"Score": 0
}
}
]
Example 17.2 This example shows the products in the response when DisplayFullResponse was set to “true.” "Products": [
{
"ProductName": "Jack Rabbit SL2 Footprint",
"Sku": "16161093019000",
"Thumb": "<img class='hawk-sqItemImage-thumb' src='http://test.hawksearch.net/assets/1/14/DimThumbnail/Big_Agnes_Jack_Rabbit_SL2_Footprint.png' />",
"Url": "http://dev.hawksearch.net/sites/elasticdemo//details.aspx?itemid=Item_153223",
"Html": "<div class=\"hawk-sqItemImage\" ><img class='hawk-sqItemImage-thumb' src='http://test.hawksearch.net/assets/1/14/DimThumbnail/Big_Agnes_Jack_Rabbit_SL2_Footprint.png' /></div>\r\n<div class=\"hawk-sqItemContent\">\r\n<h1 class=\"hawk-sqItemName\">Jack Rabbit SL2 Footprint</h1>",
"Results": {
"DocId": "Item_153223",
"Score": 1685.5974,
"Document": {
"image": [
"http://test.hawksearch.net/assets/1/14/DimThumbnail/Big_Agnes_Jack_Rabbit_SL2_Footprint.png"
],
"itemname": [
"Jack Rabbit SL2 Footprint"
],
"isonsale": [
"Yes"
],
"itemtypeid": [
"1"
],
"saleprice": [
"+0000000000000034.9700"
],
"rating": [
"+0000000000000000.0000"
],
"type": [
"Item"
],
"url": [
"/details.aspx?itemid=Item_153223"
],
"ratingrange": [
"+0000000000000000.0000"
],
"imagealttag": [
"Jack Rabbit SL2 Footprint"
],
"subdepartmentpath": [
"1|Sale",
"1|Specials",
"1|Summer Sale",
"1|Camp & Hike"
],
"price": [
"+0000000000000050.0000"
],
"department_nest": [
"1|Camp & Hike",
"2|Camp & Hike/Tents & Shelters",
"3|Camp & Hike/Tents & Shelters/Tent Accessories",
"1|Summer Sale",
"2|Summer Sale/Camp & Hike",
"3|Summer Sale/Camp & Hike/Tents & Shelters",
"1|Specials",
"2|Specials/Sat Dec 15th",
"3|Specials/Sat Dec 15th/Kids"
],
"id": [
"Item_153223"
],
"sku": [
"16161093019000"
],
"brand": [
"Big Agnes"
]
}
}
},
{
"ProductName": "Men's Jack SS Polo",
"Sku": "\r\n ",
"Thumb": "<img class='hawk-sqItemImage-thumb' src='http://test.hawksearch.net/assets/1/14/DimThumbnail/Jack-SS-Polo_Nightsky.jpg' />",
"Url": "http://dev.hawksearch.net/sites/elasticdemo//details.aspx?itemid=Item_140273",
"Html": "<div class=\"hawk-sqItemImage\" ><img class='hawk-sqItemImage-thumb' src='http://test.hawksearch.net/assets/1/14/DimThumbnail/Jack-SS-Polo_Nightsky.jpg' /></div>\r\n<div class=\"hawk-sqItemContent\">\r\n<h1 class=\"hawk-sqItemName\">Men's Jack SS Polo</h1>",
"Results": {
"DocId": "Item_140273",
"Score": 726.0669,
"Document": {
"image": [
"http://test.hawksearch.net/assets/1/14/DimThumbnail/Jack-SS-Polo_Nightsky.jpg"
],
"itemname": [
"Men's Jack SS Polo"
],
"isonsale": [
"Yes"
],
"size-property": [
"Medium",
"Large"
],
"color-property": [
"Blue",
"Grey",
"Brown",
"Green"
],
"itemtypeid": [
"3"
],
"saleprice": [
"+0000000000000043.9700"
],
"rating": [
"+0000000000000002.0000"
],
"type": [
"Item"
],
"url": [
"/details.aspx?itemid=Item_140273"
],
"ratingrange": [
"+0000000000000002.0000"
],
"imagealttag": [
"Jack-SS-Polo_Nightsky"
],
"subdepartmentpath": [
"1|Sale",
"1|Summer Sale",
"1|Summer Clearance",
"1|Specials",
"1|Men",
"1|Deals for Dad"
],
"price": [
"+0000000000000055.0000"
],
"department_nest": [
"1|Men",
"2|Men/Shirts",
"3|Men/Shirts/Casual Shirts",
"1|Specials",
"2|Specials/Sportswear",
"3|Specials/Sportswear/Mens",
"1|Summer Sale",
"2|Summer Sale/Packs",
"3|Summer Sale/Packs/Backpacking Packs",
"2|Specials/Sat Dec 15th",
"3|Specials/Sat Dec 15th/Kids",
"2|Summer Sale/Men",
"3|Summer Sale/Men/Shirts"
],
"id": [
"Item_140273"
],
"sku": [
"\r\n "
],
"brand": [
"Toad&Co"
]
}
}
},
{
"ProductName": "Boot Jack 25 Downtek",
"Sku": "\r\n ",
"Thumb": "<img class='hawk-sqItemImage-thumb' src='http://test.hawksearch.net/assets/1/14/DimThumbnail/Boot-Jack-24-zm.jpg' />",
"Url": "http://dev.hawksearch.net/sites/elasticdemo//details.aspx?itemid=Item_162525",
"Html": "<div class=\"hawk-sqItemImage\" ><img class='hawk-sqItemImage-thumb' src='http://test.hawksearch.net/assets/1/14/DimThumbnail/Boot-Jack-24-zm.jpg' /></div>\r\n<div class=\"hawk-sqItemContent\">\r\n<h1 class=\"hawk-sqItemName\">Boot Jack 25 Downtek</h1>",
"Results": {
"DocId": "Item_162525",
"Score": 5.6634693,
"Document": {
"image": [
"http://test.hawksearch.net/assets/1/14/DimThumbnail/Boot-Jack-24-zm.jpg"
],
"itemname": [
"Boot Jack 25 Downtek"
],
"isonsale": [
"No"
],
"size-property": [
"Reg Left",
"Long Left"
],
"color-property": [
"Grey",
"Navy"
],
"itemtypeid": [
"3"
],
"saleprice": [
"+0000000000000189.9500"
],
"rating": [
"+0000000000000001.5000"
],
"type": [
"Item"
],
"url": [
"/details.aspx?itemid=Item_162525"
],
"ratingrange": [
"+0000000000000001.5000"
],
"imagealttag": [
"Boot-Jack-24-zm"
],
"subdepartmentpath": [
"1|Specials",
"1|Camp & Hike"
],
"price": [
"+0000000000000189.9500"
],
"department_nest": [
"1|Camp & Hike",
"2|Camp & Hike/Sleeping Bags",
"3|Camp & Hike/Sleeping Bags/Adult Sleeping bags",
"1|Specials",
"2|Specials/Sat Dec 15th",
"3|Specials/Sat Dec 15th/Kids"
],
"id": [
"Item_162525"
],
"sku": [
"\r\n "
],
"brand": [
"Big Agnes"
]
}
}
}
]
|
Origin ObjectThis object contains geographical corrdinates. Expand |
---|
|
Object | Data Type | Always | Description |
---|
Latitude | String | Yes | Latitude is the measurement of distance north or south of the Equator. | Longitude | String | Yes | Longitude is the measurement east or west of the prime meridian. |
|
Facet ObjectThe settings for facets are controlled in the Hawksearch Workbench, in the Facets section, under Data Configuration. Details about these settings are documented in the Hawksearch online help. Click here to view. The Facet Object may be contained in the response from the Search method. Expand |
---|
|
Object | Data Type | Always | Description |
---|
FacetId | Number | Yes | Unique identifier assigned to facet by Hawksearch | Name | String | Yes | Display name for the facet. | Field | String | Yes | The name of the field that populates the facet values. | FieldType | String | Yes | Possible values: string range numeric search | FacetType | String | Yes | Possible values: checkbox nestedcheckbox* link nestedlink* slider swatch rating size openRange searchwithin recentsearches relatedsearches * nested facets need additional coding required on Hawksearch side. | DisplayType | String | Yes | Possible values: default scrolling truncating This is used in the display of the facet. See the Facet Examples section. | MaxCount | Numeric | Yes | Indicates the maximum number of facet values that are being returned. | MinHitCount | Numeric | Yes | Indicates the minimum number of results each facet value needs to have in order to be returned. | ParamName | String | No | If this is set, it is to be used as the facet name if passed in the FacetSelections. If not set, the value of the Field object would be used. (This is only applicable when a slider and range facets are both configured for the same field.) | SortBy | String | Yes | Indicates the sorting logic that is used for this facet’s values. The possible values for this are the parameters for sorting set options that are configured in Workbench > Data Configuration > Sorting/Pagination | ExpandSelection | Boolean | Yes | Indicates if the user should be able to apply more than one filter value from this facet. | IsNumeric | Boolean | Yes | Indicates if facet values are numeric. | IsCurrency | Boolean | Yes | Indicates if facet values are currency (and should be displayed appropriately). | IsSearch | Boolean | Yes | Indicates if search is enabled for this facet. If it is enabled, a search box should be available for users to filter the facet values by typing in the search box. | ScrollHeight | Number | Yes | If facet display type is Scrolling, this value is the height in pixels for the window inside scroll box. Only to be used if DisplayType is “scrolling.” | ScrollThreshold | Number | Yes | If the number of facet values exceeds this number and DisplayType is “scrolling,” then the facet should be displayed as scrolling list; if not, display as “default.” | TruncateThreshold | Number | Yes | If the number of facet values exceeds this number and DisplayType is “truncate,” then the facet should be displayed as truncated list; if not, display as “default.” | Tooltip | String | No | Text to display when user hovers over a help icon. | SearchThreshold | Number | Yes | To be used if IsSearch=true. The number of facet values must be this number or higher for the facet search box to display. | AlwaysVisible | Boolean | Yes | If false, indicates that sometimes this facet will not be returned. The conditions that trigger its display are maintained in the Workbench. | NumericPrecision | Number | Yes | This is an optional configuration when facets are FieldType of numeric. This number indicates how many decimal places should be displayed for the numeric values in this facet's value list. | Showfacetimagecount | Boolean | Yes | If FieldType=Range, this indicates if the items count should be displayed next to the range value. | IsCollapsible | Boolean | Yes | Indicates if the facet can be collapsed and expanded by the user. | IsCollapsedDefault | Boolean | Yes | If IsCollapsible=true, this indicates if the facet should initially be collapsed or expanded. | SortOrder | Numeric | Yes | The display order of the facet in the facet list. | IsVisible | Boolean | Yes | Indicates if the facet is set to be visible. This may be returned as No if all records in the results set all have the same value(s) for the facet. | NofVisible | Numeric | Yes | This is maximum number of values that could be returned for the facet. | Height | Numeric | Yes | Same as ScrollHeight | SwatchData | Array of objects | No | Will be included if FacetType is ‘swatch.’ See example of swatch facet in Example 18.3. | > Value | String | Yes | Match this value to the Value object in the Values array. | > AssetName | String | Yes | Name of the asset | > AssetUrl | String | Yes | URL of the asset | > IsDefault | Boolean | Yes | Indicates if value is the default. | > Color | String | Yes | Color of the asset. | FacetRangeDisplayType | Numeric | Yes | Indicates type of facet range display | PreloadChildren | Boolean | Yes | Indicates if setting in Workbench is set to On or Off. | ShowSliderInputs | Boolean | Yes | To be used if FacetType is ‘slider’. If ShowSliderInputs is true, input boxes should be available for user to enter values.See the Facet Examples section. | Ranges | Array of objects | Yes | Always present, but will only be populated if the facet is numeric and not a slider | > Label | String | Yes | Label of the value to display | > Value | String | Yes | Value to use when setting the facet value selection | > IsNumeric | Boolean | Yes | Indicates if the values are numeric | > LBound | String | Yes | Lower value of the range | > UBound | String | Yes | Upper value of the range | Values | Array of objects |
|
| > Label | String | No | Label of the value to display | > Value | String | No | Value to use when setting the facet value selection | > Count | Numeric | Yes | Number of results in current set that have this facet value | > Selected | Boolean | Yes | Indicates if this facet value has been selected | > RangeStart | String | No | Used for displaying the slider facet. RangeStart indicates what the starting point of the range to display, either on basis of what the user selected by sliding the slider, or if they have no selection it reflects the lowest price product. | > RangeEnd | String | No | Used for displaying the slider facet. RangeEnd indicates what the end point of the range to display is, either on basis of what the user selected by sliding the slider, or if they have no selection, it reflects the highest price product. | > RangeMin | String | No | Used for displaying the slider facet. RangeMin indicates lowest value for the range in the list of products displayed. | > RangeMax | String | No | Used for displaying the slider facet. RangeMax indicates highest value for the range in the list of products displayed. | > Path | String | No | Used for nested facets | > Level | Numeric | No | Used for nested facets. Returned only in v2 of Search API | > Children | Array of objects | No | Used for nested facets. Returned only in v2 of Search API. Since V2 of API returns nested facet values in hierarchy form, children is an array of Values. |
|
Anchor |
---|
| FacetExamples |
---|
| FacetExamples |
---|
|
Expand |
---|
| Example 18.1 Link List – Searchable, Collapsible, Truncated
Expand |
---|
title | Click here to expand example 18.1... |
---|
| {
"FacetId": 272,
"Name": "Brand",
"Field": "brand",
"FieldType": "string",
"FacetType": "link",
"DisplayType": "truncating",
"MaxCount": 200,
"MinHitCount": 1,
"ParamName": "brand",
"SortBy": "6",
"ExpandSelection": true,
"IsNumeric": false,
"IsCurrency": false,
"IsSearch": true,
"ScrollHeight": 250,
"ScrollThreshold": 10,
"TruncateThreshold": 10,
"SearchThreshold": 10,
"AlwaysVisible": true,
"Values": [
{
"Label": "The North Face",
"Value": "The North Face",
"Count": 45
},
{
"Label": "Columbia Sportswear",
"Value": "Columbia Sportswear",
"Count": 17
},
{
"Label": "White Sierra",
"Value": "White Sierra",
"Count": 3
},
{
"Label": "Spyder",
"Value": "Spyder",
"Count": 9
},
{
"Label": "Skhoop",
"Value": "Skhoop",
"Count": 1
},
{
"Label": "Sea To Summit",
"Value": "Sea To Summit",
"Count": 2
},
{
"Label": "Royal Robbins",
"Value": "Royal Robbins",
"Count": 1
},
{
"Label": "Prana",
"Value": "Prana",
"Count": 1
},
{
"Label": "Obermeyer",
"Value": "Obermeyer",
"Count": 1
},
{
"Label": "Mountain Hardwear",
"Value": "Mountain Hardwear",
"Count": 2
},
{
"Label": "Jupa",
"Value": "Jupa",
"Count": 4
},
{
"Label": "Craghoppers",
"Value": "Craghoppers",
"Count": 1
},
{
"Label": "Coghlans",
"Value": "Coghlans",
"Count": 1
},
{
"Label": "Big Agnes",
"Value": "Big Agnes",
"Count": 1
},
{
"Label": "Aventura",
"Value": "Aventura",
"Count": 1
}
],
"Tooltip": "Please select one or more brands.",
"IsCollapsible": true,
"IsCollapsedDefault": false,
"SortOrder": 2834,
"IsVisible": true,
"NofVisible": 15,
"Height": 250,
"FacetRangeDisplayType": 0,
"PreloadChildren": false,
"ShowSliderInputs": false
}
|
Example 18.2 Nested Checkbox List – Searchable, Collapsible, Truncated
Expand |
---|
title | Click here to expand example 18.2... |
---|
| {
"FacetId": 12114,
"Name": "Department",
"Field": "department_nest",
"FieldType": "string",
"FacetType": "nestedcheckbox",
"DisplayType": "truncating",
"MaxCount": 0,
"MinHitCount": 1,
"ParamName": "department_nest",
"SortBy": "ScoreAndAlphaAndAlpha",
"ExpandSelection": true,
"IsNumeric": false,
"IsCurrency": false,
"IsSearch": true,
"ScrollHeight": 0,
"ScrollThreshold": 0,
"TruncateThreshold": 5,
"SearchThreshold": 0,
"AlwaysVisible": true,
"Values": [
{
"Label": "Specials",
"Value": "Specials",
"Count": 90,
"Path": "Specials"
},
{
"Label": "Sat Dec 15th",
"Value": "Sat-Dec-15th",
"Count": 90,
"Path": "Specials/Sat Dec 15th"
},
{
"Label": "Kids",
"Value": "Kids",
"Count": 90,
"Path": "Specials/Sat Dec 15th/Kids"
},
{
"Label": "Men's",
"Value": "Men-s",
"Count": 12,
"Path": "Specials/Sat Dec 15th/Men's"
},
{
"Label": "Women's",
"Value": "Women-s",
"Count": 15,
"Path": "Specials/Sat Dec 15th/Women's"
},
{
"Label": "Sat Dec 8th",
"Value": "Sat-Dec-8th",
"Count": 53,
"Path": "Specials/Sat Dec 8th"
},
{
"Label": "Boy's",
"Value": "Boy-s",
"Count": 21,
"Path": "Specials/Sat Dec 8th/Boy's"
},
{
"Label": "Girl's",
"Value": "Girl-s",
"Count": 20,
"Path": "Specials/Sat Dec 8th/Girl's"
},
{
"Label": "Toddler's",
"Value": "Toddler-s",
"Count": 16,
"Path": "Specials/Sat Dec 8th/Toddler's"
},
{
"Label": "Sun Dec 23rd",
"Value": "Sun-Dec-23rd",
"Count": 40,
"Path": "Specials/Sun Dec 23rd"
},
{
"Label": "Boys 5-20",
"Value": "Boys-5-20_1",
"Count": 21,
"Path": "Specials/Sun Dec 23rd/Boys 5-20"
},
{
"Label": "Girls 5-20",
"Value": "Girls-5-20_1",
"Count": 20,
"Path": "Specials/Sun Dec 23rd/Girls 5-20"
},
{
"Label": "Fri Dec 21st",
"Value": "Fri-Dec-21st",
"Count": 8,
"Path": "Specials/Fri Dec 21st"
},
{
"Label": "Kid's",
"Value": "Kid-s",
"Count": 8,
"Path": "Specials/Fri Dec 21st/Kid's"
},
{
"Label": "Outerwear",
"Value": "Outerwear",
"Count": 4,
"Path": "Specials/Outerwear"
},
{
"Label": "Men",
"Value": "Men_2",
"Count": 1,
"Path": "Specials/Outerwear/Men"
},
{
"Label": "Women",
"Value": "Women_2",
"Count": 3,
"Path": "Specials/Outerwear/Women"
},
{
"Label": "Sportswear",
"Value": "Sportswear",
"Count": 1,
"Path": "Specials/Sportswear"
},
{
"Label": "Mens",
"Value": "Mens",
"Count": 1,
"Path": "Specials/Sportswear/Mens"
},
{
"Label": "Kids",
"Value": "Kids_1",
"Count": 58,
"Path": "Kids"
},
{
"Label": "Baby & Toddler 6M-4T",
"Value": "Baby--Toddler-6M-4T",
"Count": 17,
"Path": "Kids/Baby & Toddler 6M-4T"
},
{
"Label": "Fleece",
"Value": "Fleece_2",
"Count": 1,
"Path": "Kids/Baby & Toddler 6M-4T/Fleece"
},
Above is example JSON used for the facet pictured. Not all JSON is displayed here, to preserve space. |
Example 18.3 Color Swatch
Expand |
---|
title | Click here to expand example 18.3... |
---|
| { "FacetId": 73410, "Name": "Color", "Field": "color-property", "FieldType": "string", "FacetType": "swatch", "DisplayType": "truncating", "MaxCount": 10, "MinHitCount": 1, "SortBy": "Score", "ExpandSelection": false, "IsNumeric": false, "IsCurrency": false, "IsSearch": true, "ScrollHeight": 150, "ScrollThreshold": 10, "TruncateThreshold": 5, "SearchThreshold": 10, "AlwaysVisible": true, "IsCollapsible": false, "IsCollapsedDefault": false, "SortOrder": 5786, "IsVisible": true, "NofVisible": 10, "Height": 150, "SwatchData": "[{\"Value\":\"White\",\"AssetName\":\"white2.png\",\"AssetUrl\":\"\",\"IsDefault\":true,\"Color\":null},{\"Value\":\"empty\",\"AssetName\":\"emptySwatch.png\",\"AssetUrl\":null,\"IsDefault\":false,\"Color\":null},{\"Value\":\"red\",\"AssetName\":\"reg.jpg\",\"AssetUrl\":null,\"IsDefault\":false,\"Color\":null},{\"Value\":\"green\",\"AssetName\":\"green.jpg\",\"AssetUrl\":null,\"IsDefault\":false,\"Color\":null},{\"Value\":\"brown\",\"AssetName\":\"brown.jpg\",\"AssetUrl\":null,\"IsDefault\":false,\"Color\":null},{\"Value\":\"black\",\"AssetName\":\"black.jpg\",\"AssetUrl\":null,\"IsDefault\":false,\"Color\":null},{\"Value\":\"Blue\",\"AssetName\":\"blue.jpg\",\"AssetUrl\":null,\"IsDefault\":false,\"Color\":null},{\"Value\":\"Navy\",\"AssetName\":\"navy.jpg\",\"AssetUrl\":null,\"IsDefault\":false,\"Color\":null},{\"Value\":\"Yellow\",\"AssetName\":\"yellow.jpg\",\"AssetUrl\":null,\"IsDefault\":false,\"Color\":null},{\"Value\":\"Purple\",\"AssetName\":\"purple.png\",\"AssetUrl\":null,\"IsDefault\":false,\"Color\":null},{\"Value\":\"Grey\",\"AssetName\":\"grey.jpg\",\"AssetUrl\":null,\"IsDefault\":false,\"Color\":null}]", "FacetRangeDisplayType": 0, "PreloadChildren": false, "ShowSliderInputs": false, "Ranges": [], "Values": [ { "Label": "Black", "Value": "Black", "Count": 41, "Selected": false }, { "Label": "Blue", "Value": "Blue", "Count": 34, "Selected": false }, { "Label": "Grey", "Value": "Grey", "Count": 24, "Selected": false }, { "Label": "Pink", "Value": "Pink", "Count": 16, "Selected": false }, { "Label": "Red", "Value": "Red", "Count": 21, "Selected": false }, { "Label": "Purple", "Value": "Purple", "Count": 14, "Selected": false }, { "Label": "White", "Value": "White", "Count": 14, "Selected": false }, { "Label": "Green", "Value": "Green", "Count": 12, "Selected": false }, { "Label": "Navy", "Value": "Navy", "Count": 8, "Selected": false }, { "Label": "Orange", "Value": "Orange", "Count": 6, "Selected": false } ] }, |
Example 18.4 Range Slider
Expand |
---|
title | Click here to expand example 18.4... |
---|
| { "FacetId": 91942, "Name": "Price slider", "Field": "Price", "FieldType": "range", "FacetType": "slider", "DisplayType": "default", "MaxCount": 0, "MinHitCount": 0, "ParamName": "priceslider", "SortBy": "ScoreAndAlphaAndAlpha", "ExpandSelection": false, "IsNumeric": false, "IsCurrency": false, "CurrencySymbol": "$", "IsSearch": false, "ScrollHeight": 0, "ScrollThreshold": 0, "TruncateThreshold": 0, "SearchThreshold": 0, "AlwaysVisible": true, "ShowItemsCount": false, "Tooltip": "", "IsCollapsible": false, "IsCollapsedDefault": false, "SortOrder": 8, "IsVisible": true, "NofVisible": 0, "Height": 0, "SwatchData": [], "FacetRangeDisplayType": 1, "PreloadChildren": false, "ShowSliderInputs": true, "Ranges": [], "Values": [ { "Count": 57, "Selected": false, "RangeStart": "230", "RangeEnd": "899", "RangeMin": "0" "RangeMax": "1229" } ], "HiddenValues": [], "ShowFacetCount": false } |
Example 18.5 Open Range
Expand |
---|
title | Click here to expand example 18.5... |
---|
| { "FacetId": 150883, "Name": "Create Date", "Field": "createdate", "FieldType": "range", "FacetType": "openRange", "DataType": "datetime", "DisplayType": "default", "MaxCount": 0, "MinHitCount": 0, "ParamName": "", "SortBy": "Alpha", "ExpandSelection": true, "IsNumeric": false, "IsCurrency": false, "CurrencySymbol": "", "IsSearch": false, "ScrollHeight": 0, "ScrollThreshold": 0, "TruncateThreshold": 0, "SearchThreshold": 0, "AlwaysVisible": true, "ShowItemsCount": false, "Tooltip": "", "IsCollapsible": false, "IsCollapsedDefault": false, "SortOrder": 18, "IsVisible": true, "NofVisible": 0, "Height": 0, "SwatchData": [], "FacetRangeDisplayType": 1, "PreloadChildren": false, "ShowSliderInputs": false, "Ranges": [], "Values": [ { "Count": 53, "Selected": false, "RangeStart": "2020-10-27T22:13:20Z", "RangeEnd": "2021-09-03T23:32:12Z", "RangeMin": "2020-10-27T22:13:20Z", "RangeMax": "2021-09-03T23:32:12Z" } ], "HiddenValues": [], "ShowFacetCount": false } |
|
Anchor |
---|
| Redirect Object |
---|
| Redirect Object |
---|
|
Redirect ObjectThis object may be contained in the response from the Search method. Expand |
---|
|
Object | Data Type | Description |
---|
Location | String | When this object is populated, the string will hold a URL that should be used to redirect the user. The URL may be relative or absolute. Redirect Rules are configured in Workbench > Merchandising > Redirects | Target | String | If this string holds the value, "_blank", the URL in the Location object should open in a new window/tab. This is configured in the Target field in the Redirects section of the Workbench. |
|
Expand |
---|
| Example 19.1 "Redirect": { "Location": "/careers",
"Target": "_blank" }
|
Anchor |
---|
| CompareResultsObject |
---|
| CompareResultsObject |
---|
|
Compare Results ObjectThe Results Object is returned in the Search method and the Autocomplete method. Expand |
---|
|
Object | Data Type | Always | Description |
---|
Results | Array of objects | Yes | An entry in the array for each item returned in compare results. | DocId | String |
| Value of the unique key | Score | Number |
| The relevancy score that has been calculated by the Hawksearch engine. | Document | Contains properties |
| Contains the fields assigned to each item. This is driven by the fields defined in Hawksearch Workbench. Each field is an object with 2 properties: - value - may differ depend on field type
- compare - boolean flag, set to true if field is meant to be used for comparison
|
|
Expand |
---|
| Example 20.1
The values in the Document object will vary. This is dependent on the fields that are configured in your Hawksearch engine workbench, and the fields that are flagged to be included in the results. { Code Block |
---|
| {
"DocId": "Item_147844",
"Score": 1,
"Document": {
"imagealttag": {
"value": [
"GLACIAL-FLEECE-HALF-ZIP-JACKET-Fuse-Green-Grill"
],
"compare": false
},
"price": {
"value": [
"+0000000000000030.0000"
],
"compare": false
},
"itemname": {
"value": [
"Boy's Glacial Half Zip Jacket Junior"
],
"compare": false
},
"sku": {
"value": [
"\r\n "
],
"compare": true
}
}
} |
|
Anchor |
---|
| PageContentObject |
---|
| PageContentObject |
---|
| PageContent ObjectThis may be contained in the response from the Search method. This is returned as part of Content Landing Pages. Landing pages are configured in Workbench > Merchandising > Landing Pages. Expand |
---|
|
Object | Data Type | Description |
---|
ZoneName | String | The name of the zone in which the content should be placed. The zone names are configured in the Hawksearch Workbench > Merchandising > Landing Pages > Layouts. Within Layouts, zone and their names are configured. Unlike Merchandising Object, the PageContent Object can contain multiple pieces of content to be placed in a single zone. | Items | Array of objects |
| > Title | String | If ContentType=featured, this i the title to display with the featured items. | > Name | String | Name of content item. Not intended to display to the user. | > Content Type | String | Value can be “image,” “custom,” "featured," or “widget.” (Further custom programming required to use the “widget” type.) | > ImageUrl | String | If ContentType=image, this holds the url where the image is located. | > AltTag | String | If ContentType=image, this may be included with the value to be used as the Alt Tag value. | > ForwardUrl | String | If ContentType=image, this may be included. If present, the image should be linkable to the URL provided in the ForwardUrl object. | > Output | String | If ContentType=custom, this may be included. If present, it will contain HTML that should be used for display. | > WidgetArgs | String | Reserved for the ContentType=widget. (Further custom programming required to use the “widget” type.) | > IsMobile | String | Indicates of this content piece was flagged for mobile in the Workbench > Merchandising > Content Items | > IsTrackingEnabled | String | Indicates of this content piece was flagged to have tracking enabled in the Workbench > Merchandising > Content Items | > FeaturedItems | Array of objects | See FeaturedItems Object section. |
|
Expand |
---|
|
Code Block |
---|
"PageContent": [
{
"ZoneName": "Sub Content 1",
"Items": [
{
"Name": "persona",
"ContentType": "image",
"ImageUrl": "//local.hawksearch.com/assets/1168/2banner_persona3.png",
"AltTag": "persona",
"ForwardUrl": "",
"Output": "",
"WidgetArgs": "",
"IsMobile": false,
"IsTrackingEnabled": false,
"MobileWidth": 0,
"MobileHeight": 0,
"BannerId": 0,
"CampaignId": 0
}
]
},
{
"ZoneName": "Sub Content 2",
"Items": [
{
"Name": "persona",
"ContentType": "image",
"ImageUrl": "//local.hawksearch.com/assets/1168/jackets_persona4.png",
"AltTag": "persona",
"ForwardUrl": "",
"Output": "",
"WidgetArgs": "",
"IsMobile": false,
"IsTrackingEnabled": false,
"MobileWidth": 0,
"MobileHeight": 0,
"BannerId": 0,
"CampaignId": 0
}
]
}
] |
|
Anchor |
---|
| VisitorTargetsObject |
---|
| VisitorTargetsObject |
---|
| VisitorTargets ObjectThis object may be contained in the response from the Search method. Expand |
---|
|
Object | Data Type | Description |
---|
Id | String | When this object is populated, the string will hold the unique identifier for the Visitor Target. This is generated by Hawksearch when a Visitor Target is created. | Name | String | This holds the name of the Visitor Target. This can be configured in the Visitor Targets section of the Workbench. |
|
Expand |
---|
|
Code Block |
---|
"VisitorTargets": [
{
"Id": 9346,
"Name": "Illinois"
}
] |
|
|