sml_FacetedSearch_Facet

Release 1.3 - ...

The Facet smartlet displays a single facet. Facets are defined in the query xml. The main smartlet controls Facet smartlets using the newSearch event.

Because the facet smartlets are controlled from the main smartlet for a large part, its public properties are limited:

Name Type Default Description
facet string contenttype The name of the facet as defined in the query xml
options string *)

String of comma-separated name=value pairs. Do not use any whitespace in the options property. The following options are supported (defaults are bold):

  • allowmulti
    int (0, 1 or 2) that shows or hides the option to change the combination of filters. Setting allowmulti to 2 will not show the option, but will set the multi-mode to non-default. **)
  • searchbase
    Chooses a search base from the query xml. The default is defined there as well.
  • searchstart
    client|server|user; determines if the search is performed before (server) or after (client) the UI is sent to the client, or only after the users clicks the search button (user). For non-scripting clients, the default will be server.
  • allowemptysearch
    int (0 or 1) that allows the searchterm property to be empty.
  • nopaging
    int (0 or 1) that disables the paging links, always showing all values.
  • display
    show|auto; determines if the facet is shown always, or only if it contains relevant filtering.
pagesize int 5 The number of values listed by the facet. Also the number by which the list is increased with the more... link.
collapsed bool false Collapses the smartlet box. A collapsed facet doesn't call back to the server when the NewSearch event is fired.

*) Options are passed from the main smartlet, but can be overridden in the facet.
**) The default for multi-mode is and if the facet allows it, single otherwise.

The values listed in the facet are filtered by the searchterm and all other filters. Depending on the multi-mode, the facet's own value is also taken into account:

Multi-mode Facet self-filter
single Passes only the selected value
or No filter
and Applies its own filter
not No filter

 

Other (non-public) properties:

Name Type Default Description
searchterm string Search term(s), as processed by the Faceted Search PrepareInputdata macro.
data string Used to return html to the client in an AJAX callback.
filters string JSON object containing the currently active filters.
queryinfo string Used to return debug information (in verbose mode).
verbose int Set >0 to get debug information.
searchprofile string Determines the searchprofile to use. As of release 1.3 only supports "Search within title".
searchexpression string The previous search definition. Used for search within.
queryxml int The item number of the query xml used for this faceted search instance.
multiselect string and/single (see note above) Sets the multi select mode for the facet. [single,or,and,not]
maxrows int The number of results to show in the facet. Incremented with pagesize every time the "more..." link is clicked.