Facet and Field Types
FacetFieldType is a property of the facet indicating the type of field is is associated with. Although this closely resembles the FieldType property for a given field, it is not exactly the same.
FacetFieldType Description | Description |
---|---|
string | this is the most common facet field type indicating that the data this facet’s field holds is of the alphabetic or the alphanumeric type |
numeric | this indicates the data held by the corresponding field is purely numeric. Use this for currency and range facets |
range | for textual field values only open range is allowed however for numeric field values, selecting this provides option to have the facet type as an open range/checkbox/linklist/slider |
search | this is a special type of facet which can only be of 3 types - Related Searches, Recent Searches, Search Within |
tab | this is a relatively new facet field type used to hold the tab names for the productsexplained below |
Tab:
Hawksearch can index both product and content data. Although we often see search results to be products alone, there are times when you would want to link to a page/ news article / blog post or a document.
This provides a challenge in controlling the search behavior. The user expects the search results to be segregated by the item's type.
Tabs are special facets which have a different UI compared to all the other facets. They are used to provide a grouping mechanism in a tabulated manner for various types of search results.
By default, the type of search result item displayed is of the product type - this can be easily configured in the facet settings:
Sample request could be as follows:
{
"FacetSelections": {
"it": ["content"]
},
"ClientGuid": "YOUR CLIENT GUID HERE",
"ClientData": {
"VisitorId": "273a9403-ed2d-4656-85c7-48b5aaf4cf6e",
"VisitId": "2981c167-cc7c-4c9f-83f9-d733a76c4931",
"UserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36",
"PreviewBuckets": []
}
}
The output format of a tabulated facet will be as below (notice the fieldtype to be tab):
{
"FacetId": 83297,
"Name": "Tabs",
"Field": "it",
"FieldType": "tab",
"FacetType": "checkbox",
"DataType": "string",
"DisplayType": "default",
"MaxCount": 10,
"MinHitCount": 1,
"ParamName": "",
"SortBy": "Custom",
"ExpandSelection": true,
"IsNumeric": false,
"IsCurrency": false,
"CurrencySymbol": "",
"IsSearch": false,
"ScrollHeight": 0,
"ScrollThreshold": 0,
"TruncateThreshold": 0,
"SearchThreshold": 0,
"AlwaysVisible": true,
"Tooltip": "",
"IsCollapsible": false,
"IsCollapsedDefault": false,
"SortOrder": 27449,
"IsVisible": true,
"NofVisible": 0,
"Height": 0,
"SwatchData": [],
"FacetRangeDisplayType": 0,
"PreloadChildren": false,
"ShowSliderInputs": false,
"Ranges": [],
"Values": [
{
"Label": "Content",
"Value": "content",
"Count": 98,
"Selected": true,
"NoFollow": "true"
},
{
"Label": "Products",
"Value": "item",
"Count": 2645,
"Selected": false,
"NoFollow": "true"
}
],
"HiddenValues": []
},
Disambiguation
Field → FieldType
FieldType of a field indicates the storage and indexing methods to be used for the field.
Field → Type
Type of a field is the actual datatype which can be held by the field
Facet → FacetFieldType
This correlates to the Field’s Type attribute however it is not exactly the same. It is the datatype
Facet → FacetType
This related to the way the facet is intended to be displayed on the front end. This is not to be confused with the DisplayType described next. This is dependent on the FacetFieldType property and changes accordingly. Generally, the FacetType options are the same for String, Numeric and Tabs FacetFieldTypes.
Facet → FacetDisplayType
This is an option to further configure the facet’s display - we can:
- Limit the number of facet values displayed - through truncating display
- Pack large number of facet values into a smaller area - through scrolling display
Note: This depends on the FacetType. For range facets, this doesn’t apply. For nested facets, scrolling doesn’t apply
Possible Configurations
Field.FieldType | Field.Type | Facet.FacetFieldType | Facet.FacetType | Facet.DisplayType |
---|---|---|---|---|
facet | Boolean | range | checkbox | default |
facet | Boolean | string | checkbox | default |
facet | Boolean | string | checkbox | scrolling |
facet | Boolean | string | link | default |
facet | Datetime | range | checkbox | default |
facet | Datetime | range | link | default |
facet | Datetime | range | openRange | default |
facet | Datetime | range | slider | default |
facet | GeoPoint | range | checkbox | default |
facet | NULL | range | slider | scrolling |
facet | NULL | string | checkbox | default |
facet | NULL | string | checkbox | scrolling |
facet | NULL | string | checkbox | truncating |
facet | Single | numeric | checkbox | default |
facet | Single | numeric | checkbox | scrolling |
facet | Single | numeric | checkbox | truncating |
facet | Single | numeric | rating | default |
facet | Single | numeric | slider | default |
facet | Single | range | checkbox | default |
facet | Single | range | checkbox | scrolling |
facet | Single | range | checkbox | truncating |
facet | Single | range | link | default |
facet | Single | range | link | scrolling |
facet | Single | range | openRange | default |
facet | Single | range | slider | default |
facet | Single | range | slider | scrolling |
facet | Single | range | slider | truncating |
facet | Single | string | checkbox | default |
facet | Single | string | checkbox | scrolling |
facet | Single | string | checkbox | truncating |
facet | Single | string | link | scrolling |
facet | Single | string | rating | default |
facet | Single | string | rating | scrolling |
facet | String | numeric | checkbox | default |
facet | String | numeric | checkbox | truncating |
facet | String | range | checkbox | default |
facet | String | range | checkbox | scrolling |
facet | String | range | checkbox | truncating |
facet | String | range | link | default |
facet | String | range | link | scrolling |
facet | String | range | openRange | default |
facet | String | range | recentsearches2 | default |
facet | String | search | search | default |
facet | String | string | checkbox | default |
facet | String | string | checkbox | scrolling |
facet | String | string | checkbox | truncating |
facet | String | string | Checkbox list | Text |
facet | String | string | link | default |
facet | String | string | link | scrolling |
facet | String | string | link | truncating |
facet | String | string | nestedcheckbox | default |
facet | String | string | nestedcheckbox | scrolling |
facet | String | string | nestedcheckbox | truncating |
facet | String | string | nestedlinklist | default |
facet | String | string | nestedlinklist | truncating |
facet | String | string | rating | default |
facet | String | string | rating | scrolling |
facet | String | string | rating | truncating |
facet | String | string | size | default |
facet | String | string | size | scrolling |
facet | String | string | size | truncating |
facet | String | string | swatch | default |
facet | String | string | swatch | scrolling |
facet | String | string | swatch | truncating |
facet | String | tab | checkbox | default |
facet | String | tab | link | default |
keyword | Boolean | numeric | checkbox | default |
keyword | Boolean | string | checkbox | default |
keyword | Datetime | range | slider | default |
keyword | Single | numeric | checkbox | default |
keyword | Single | numeric | checkbox | truncating |
keyword | Single | numeric | slider | default |
keyword | Single | range | checkbox | default |
keyword | Single | range | checkbox | scrolling |
keyword | Single | range | link | scrolling |
keyword | Single | range | slider | default |
keyword | Single | string | checkbox | default |
keyword | Single | string | checkbox | scrolling |
keyword | Single | string | rating | default |
keyword | String | string | checkbox | default |
keyword | String | string | checkbox | scrolling |
keyword | String | string | checkbox | truncating |
keyword | String | string | link | scrolling |
keyword | String | string | nestedcheckbox | default |
keyword | String | string | nestedcheckbox | scrolling |
keyword | String | string | nestedcheckbox | truncating |
keyword | String | string | size | default |
keyword | String | string | size | scrolling |
keyword | String | tab | checkbox | default |
text | String | string | checkbox | scrolling |
text | String | string | link | scrolling |
unindexed | String | string | checkbox | default |
unindexed | String | string | checkbox | scrolling |
Updated over 1 year ago