Using the Smart search filter

The Smart search filter web part can be used to enable users limit the range of documents that will be searched, or define how the search results will be sorted. It is designed to be connected to 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 a 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 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

Filter is conditional

If true, the filter limit the searched documents. If false, the filter determines the sorting of search results.

Search webpart ID

ID of the Smart search dialog or Smart search dialog with results web part to which the filter is connected.

Values

Using this property, you can specify the possible values that can be selected using the filter.

You enter one option per line in format: <fake dataset field>;<value of the field>;<displayed text>

 

Examples:

;;All
+classname;cms.cellphone;Cell phones
+_created;[{%CurrentTime|(add)-10080|(tosearchdatetime)%} TO {%CurrentTime|(tosearchdatetime)%}];Past week
##SCORE##;;Score
documentcreatedwhen;;Creation date