Kentico CMS 7: Smart search
Version 7 brings many improvements for the smart search module and extends its usability to cover advanced requirements and needs.
Smart search is one of the most widely used modules in Kentico CMS and is constantly being improved based on your feedback
. This blog post introduces the new additions to its functionality.
Document categories (faceted search)
One way to organize documents is to add them to one or more categories. The smart search now provides a way to include the names of the categories assigned to documents directly into the main content of document indexes. This can help users find relevant results through standard content searches.
You can also leverage the category structure when preparing filtering options. By combining various types
of filters in this scenario, you can use the smart search to implement faceted navigation
TextBox filter type
The Smart search filter web part now supports a new TextBox input type. This allows users to search for any text in specific data fields of the index. It should be very helpful in cases where a filter with a fixed set of options is not suitable due to a wide range of possible values.
This type of filter can also be used as a replacement for the smart search dialog (the dialog must be placed on the page, but can be hidden), which gives you more flexibility when creating a custom design for search pages (without requiring customization of the dialog web part).
Search results extensions
By disabling the new property Search text required, you can allow loading of results even when no search query is submitted. In this case the search is based on the default settings and filter values attached to the search result web part. With the second new option, Search on each page load, the search is automatically triggered immediately when the search result page is loaded, without requiring any action from the user. The results are displayed based on the default settings of the web parts.
The next new feature makes it easier to troubleshoot the smart search. Previously, it wasn't easy to find out exactly what's wrong and why the smart search isn't returning any results. In version 7, you can enable the Show parsing errors property of smart search result web parts. If an error occurs during the processing of a search query, the system displays a message with all related details.
The highly flexible Universal pager web part can now be attached to smart search results. This allows you to easily change the appearance of the result page without customization of code. The default pager of the result web part is automatically disabled in this case.
Loading index values for result items
The transformation method GetSearchValue allows you to retrieve values from the object found by the smart search (document, custom table etc.). In version 7, you can additionally use it to load any other data from the search index fields for the current result item. This should be particularly helpful for custom indexes, where the required values are only present in the index and cannot be retrieved through custom code.