The Smart search filter web part can be used to allow users to limit the range of objects that will be searched (conditional filter), or define how the search results will be sorted. It is designed to be connected to the Smart search dialog or Search dialog with results. You can connect more than one filter to these web parts.
You can see an example of how this works on the sample Corporate Site, on the Examples -> Web parts -> Full-text search -> Smart search filter page. You can see three Smart search filters connected to a Smart search dialog, which is connected to Smart search results.
The behaviour of the smart search filter is mainly defined by the properties explained in the table below. You can find descriptions of all the web part's properties in the Kentico CMS Web Parts reference or after clicking the Documentation link at the top right corner of the web part properties window.
Property Name |
Description |
||||||||||
Search webpart ID |
ID of the Smart search dialog or Smart search dialog with results web part to which the filter should be connected. |
||||||||||
Values |
Using this property, you can specify the possible filtering options that can be selected. You enter one option per line in format: <index field name>;<value of the field>;<displayed text>
When creating a conditional filter, the logical value of each filtering option can be specified. If the + symbol is added before the option, then only objects whose value in the given field matches the specified value will be included in the search. If the - symbol is added, only results that do not match the value will be returned.
Please note, when entering integer or double type fields as filter options, the type of the value needs to be specified in the following way: +DocumentCreatedByUserID;(int)53;Administrator
Examples:
|
||||||||||
Query name |
Name of the query which can be used instead of the Values property to dynamically create the filter options. The query must return three columns, which will be used in the following order: <index field name>,<value of the field>,<displayed text>
Sample query to load all document types as the filter options:
|
||||||||||
Filter clause |
Sets a clause that overrides the logical values specified for filtering options. Possible choices are:
|
||||||||||
Filter is conditional |
If true, the filter limits the searched documents (where condition). If false, the filter determines the sorting of search results (order by condition). |
Page url: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?smart_search_filter.htm