Facet and Field Types

See also -

 

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

FacetFieldType

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 products, explained 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 within OpenSearch.

keywordtext - Field values indexed ""as is"" AND are stemmed
keyword - Field values are NOT stemmed
text - Field values are ONLY stemmed (search only)
unindexed - Stored only, not used for search nor facets
facet - Field values are NOT stemmed

 

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. 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

Field.FieldType

Field.Type

Facet.FacetFieldType

Facet.FacetType

Facet.DisplayType

Field values are NOT stemmed

Boolean

range

checkbox

default

Field values are NOT stemmed

Boolean

string

checkbox

default

Field values are NOT stemmed

Boolean

string

checkbox

scrolling

Field values are NOT stemmed

Boolean

string

link

default

Field values are NOT stemmed

Datetime

range

checkbox

default

Field values are NOT stemmed

Datetime

range

link

default

Field values are NOT stemmed

Datetime

range

openRange

default

facField values are NOT stemmedt

Datetime

range

slider

default

Field values are NOT stemmed

GeoPoint

range

checkbox

default

Field values are NOT stemmed

NULL

range

slider

scrolling

Field values are NOT stemmed

NULL

string

checkbox

default

Field values are NOT stemmed

NULL

string

checkbox

scrolling

Field values are NOT stemmed

NULL

string

checkbox

truncating

Field values are NOT stemmed

Single

numeric

checkbox

default

Field values are NOT stemmed

Single

numeric

checkbox

scrolling

Field values are NOT stemmed

Single

numeric

checkbox

truncating

Field values are NOT stemmed

Single

numeric

rating

default

Field values are NOT stemmed

Single

numeric

slider

default

Field values are NOT stemmed

Single

range

checkbox

default

Field values are NOT stemmed

Single

range

checkbox

scrolling

Field values are NOT stemmed

Single

range

checkbox

truncating

Field values are NOT stemmed

Single

range

link

default

Field values are NOT stemmed

Single

range

link

scrolling

Field values are NOT stemmed

Single

range

openRange

default

Field values are NOT stemmed

Single

range

slider

default

Field values are NOT stemmed

Single

range

slider

scrolling

Field values are NOT stemmed

Single

range

slider

truncating

Field values are NOT stemmed

Single

string

checkbox

default

Field values are NOT stemmed

Single

string

checkbox

scrolling

Field values are NOT stemmed

Single

string

checkbox

truncating

Field values are NOT stemmed

Single

string

link

scrolling

Field values are NOT stemmed

Single

string

rating

default

Field values are NOT stemmed

Single

string

rating

scrolling

Field values are NOT stemmed

String

numeric

checkbox

default

Field values are NOT stemmed

String

numeric

checkbox

truncating

Field values are NOT stemmed

String

range

checkbox

default

Field values are NOT stemmed

String

range

checkbox

scrolling

Field values are NOT stemmed

String

range

checkbox

truncating

Field values are NOT stemmed

String

range

link

default

Field values are NOT stemmed

String

range

link

scrolling

Field values are NOT stemmed

String

range

openRange

default

Field values are NOT stemmed

String

range

recentsearches2

default

Field values are NOT stemmed

String

search

search

default

Field values are NOT stemmed

String

string

checkbox

default

Field values are NOT stemmed

String

string

checkbox

scrolling

Field values are NOT stemmed

String

string

checkbox

truncating

Field values are NOT stemmed

String

string

Checkbox list

Text

Field values are NOT stemmed

String

string

link

default

Field values are NOT stemmed

String

string

link

scrolling

Field values are NOT stemmed

String

string

link

truncating

Field values are NOT stemmed

String

string

nestedcheckbox

default

Field values are NOT stemmed

String

string

nestedcheckbox

scrolling

Field values are NOT stemmed

String

string

nestedcheckbox

truncating

Field values are NOT stemmed

String

string

nestedlinklist

default

Field values are NOT stemmed

String

string

nestedlinklist

truncating

Field values are NOT stemmed

String

string

rating

default

Field values are NOT stemmed

String

string

rating

scrolling

Field values are NOT stemmed

String

string

rating

truncating

Field values are NOT stemmed

String

string

size

default

Field values are NOT stemmed

String

string

size

scrolling

Field values are NOT stemmed

String

string

size

truncating

Field values are NOT stemmed

String

string

swatch

default

Field values are NOT stemmed

String

string

swatch

scrolling

Field values are NOT stemmed

String

string

swatch

truncating

Field values are NOT stemmed

String

tab

checkbox

default

Field values are NOT stemmed

String

tab

link

default

Field values are NOT stemmed

Boolean

numeric

checkbox

default

Field values are NOT stemmed

Boolean

string

checkbox

default

Field values are NOT stemmed

Datetime

range

slider

default

Field values are NOT stemmed

Single

numeric

checkbox

default

Field values are NOT stemmed

Single

numeric

checkbox

truncating

Field values are NOT stemmed

Single

numeric

slider

default

Field values are NOT stemmed

Single

range

checkbox

default

Field values are NOT stemmed

Single

range

checkbox

scrolling

Field values are NOT stemmed

Single

range

link

scrolling

Field values are NOT stemmed

Single

range

slider

default

Field values are NOT stemmed

Single

string

checkbox

default

Field values are NOT stemmed

Single

string

checkbox

scrolling

Field values are NOT stemmed

Single

string

rating

default

Field values are NOT stemmed

String

string

checkbox

default

Field values are NOT stemmed

String

string

checkbox

scrolling

Field values are NOT stemmed

String

string

checkbox

truncating

Field values are NOT stemmed

String

string

link

scrolling

Field values are NOT stemmed

String

string

nestedcheckbox

default

Field values are NOT stemmed

String

string

nestedcheckbox

scrolling

Field values are NOT stemmed

String

string

nestedcheckbox

truncating

Field values are NOT stemmed

String

string

size

default

Field values are NOT stemmed

String

string

size

scrolling

Field values are NOT stemmed

String

tab

checkbox

default

Field values are ONLY stemmed (search only)

String

string

checkbox

scrolling

Field values are ONLY stemmed (search only)

String

string

link

scrolling

Stored only, not used for search nor facets

String

string

checkbox

default

Stored only, not used for search nor facets

String

string

checkbox

scrolling

 

Â