The search filters describes how to use search filters to build queries. You can pick from a number of existing filters. Sitecore provides a number of search filters by default, but you have the ability to add more custom filters.
To add a new search filter:
- In the content tree, navigate to
/sitecore/system/Settings/Buckets/Search Types. Sitecore recommends that you add new search filters in the User Defined folder.
- Select the User Defined folder, and on the Home tab, in the Insert group click Field Search Type. Give the new search type an appropriate name. This is the name that users enter in the search box to apply the filter.
For example: if you name the search type Date, the user must type in Date: in the search box to apply the filter. The name is case sensitive.
- In the new search type item, in the Search Type section, in the Control Type field select the type of control that is most appropriate for your search.
- In the Display Text field, enter an appropriate text and ensure that the wording is consistent with all the other search filters. This text is displayed in the drop-down menu when users browse the search filters.
- If you want to apply a custom syntax to the Control Type field to create specific output.
, enter this in the Web Method field.
For example, if the Control Type field is a calendar, the Web Method field can make a request to a web service to tell Sitecore to display a calendar control that only allows you to select a date from the last 2 calendar years.
Some field names are long and descriptive, and therefore not very easy to type into a search box.
You can create alias filters. These work as aliases for search fields with long names to make searching easier. For example, you could assign an alias to a field called Product Price, giving it the more searchable alias price. You can also add a slider control so users can slide between prices. The control type parameters for this slider are: