Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


  • ExpandSelection: Boolean value for collapsible facets, to set the default view as expanded (on page load/refresh).

    IsNumeric: Indicator for range type of facets to show the slider. This property is hidden for all other facet types.

    This is Boolean value (true/false) in the API response.






    IsCurrency: Indicates if the facet needs to display the currency symbol. If the facet's FieldType is set as either numeric or range, and the display type is slider, then this option is displayed.

    IsSearch: This makes the facet searchable for its filters. This is useful for facets containing more than 15 values in general.

    Front end site shows this way:

    The API response has Boolean value.
    ScrollHeight and ScrollThreshold: Shown in the workbench's facet page when the facet's DisplayType is set to scrolling. Enables adjustment of the facet height based on the values passed. ScrollHeight sets the height of the facet in pixels. ScrollThreshold sets the minimum limit for the number of filters to be present in the facet for it to be displayed in a scrolling manner.
    Typical values for ScrollHeight and ScrollThreshold are 150 and 10 respectively. If facet displaytype is not scrolling, then default values need to be 0 for both.

    Below example is a facet set to scrolling display type. Since this facet has more than 10 filters (ScrollThreshold), the height of 150px (ScrollHeight) is set to the facet.






    TruncateThreshold: This is similar to the scrolling facet. The difference is that the truncated facet shows only the first N values where N is the number set in the workbench, to load more values, user needs to click the "show more" link:

    More info available here - https://hawksearch.atlassian.net/wiki/spaces/HSKB/pages/327746/Facets#Facets-TruncatingDisplayType
    SearchThreshold: Similar to the truncating threshold, search threshold specifies the minimum number of filters to be present in the facet to make it search-able. The facet needs to have "Is Search Enabled?" set to on, in other words IsSearch property needs to be true.


    AlwaysVisible: Boolean indicator for visibility of the facets. Any facet which needs to be displayed on the front end has to have this set to true. If false, one or more rules needs to be defined which when satisfied, will display the facet.



    This has secondary priority against the "IsVisible" property which, if turned off, doesn't display the facet regardless of the AlwaysVisible property's value.
    Values: this is the property holding a list of facet filter (facet value) objects.
    Every facet filter has the following properties:
    a. Label – display name of the filter
    b. Value – internal value associated with the filter.
    c. Count – number of items in the search results which match the facet filter.
    d. NoFollow – text field either blank "" or rel="nofollow" to indicate if the facet does not need to be followed by web crawlers – this pertains to SEO optimization.

    Front end output has these values displayed, clicking on which the internal Value field is sent to Hawk as a filter request.





    Tooltip: quick help for the user available when hovered over the question mark next to the facet name




    IsCollapsible: Boolean value indicating whether the facet can be completely collapsed into a header




    IsCollapsedDefault: Boolean value indicating collapsible display


    The facet is collapsed/expanded by default based on this property.


    SortOrder:

    The sort order is relative to the other facets. It can be updated by entering the number or using the arrows highlighted below to drag and drop the facet relative to other facets.





    IsVisible: Boolean switch to toggle the visibility of the facet


    NofVisible:


    Height:



    FacetRangeDisplayType: Numeric value to indicate the sub type of the facet when it is a range.

    Available values:
    0 - None/Not a range facet
    1 - Text


    2 - Image


    3 - Both




    PreloadChildren: Nested facets can load children filters either upon click event of the parent filter or automatically. This choice can be opted based on the value of this property.
    Available values:


    ShowSliderInputs: For slider facet, the user-entered inputs can be made visible using this property.


    SwatchData: A special type of facet is a swatch which displays images instead of the facet filters. The JSON output consists of the list of images. This is most useful for colors.









    Ranges: This property corresponds to the facet which displays the ranges. A range facet, if changed to display like a checkbox list or link list, will provide an option for adding ranges. This helps with fields which need to provide searching continuous values within discrete ranges.


    Updating Field and Facet properties
    The article - API Documentation - v4 and the api info page http://apilusearchapi-na.hawksearch.infocom/api/v9 - have detailed information on the API.
    To update the field, below are the recommended steps to follow:
    i. Query Hawk for the list of all fields with a GET request for this endpoint: https://apilusearchapi-na.hawksearch.infocom/api/v9/Field

  • this will return all the fields with their properties.

ii. Then copy the properties of the field to be updated.iii. Then send a PUT request with the updated property/properties to this endpoint: https://apilusearchapi-na.hawksearch.infocom/api/v9/Field/{id}

  • this will update one or more field property/properties using a single request

Similarly, to update the facet, below are the recommended steps to follow:
i. Query Hawk for the list of all fields with a GET request for this endpoint: https://apilusearchapi-na.hawksearch.infocom/api/v9/Facet

  • this will return all the facets with their properties.

ii. Then copy the properties of the facet to be updated.iii. Then send a PUT request with the updated property/properties to this endpoint: https://apilusearchapi-na.hawksearch.infocom/api/v9/Facet/{id}

  • this will update one or more facet property/properties using a single request

...