Setting search criteria for a custom search

Using the Custom Search portlet, you can define searches that only returns results that match a set of predefined conditions. You can predefine a set of conditions if you wish, so that they appear on the search form when it is displayed in the portlet. If your custom search portlet displays a search form the users can override the search criteria that you define.

Alternatively, you may want to hide search conditions from the portlet users such that they cannot be changed.

For example, you can create a portlet that searches for a list of items in a selected category that have been modified in the last 7 days. If you do not display the category details, the user can only search in the category you specify. If you choose to display the Date Updated attribute the default is provided, but the user can modify the date as required.

NoteYou must be the administrator, a page builder or have the appropriate privileges to edit the default settings of the Custom Search portlet.

To set search criteria for a custom search:

  1. Navigate to the page that contains the Custom Search portlet.

  2. Click Edit Page to switch to Edit mode.

  3. Click (Actions) beside the portlet.

  4. Click Edit Defaults.

    Note: All the options for the Custom Search portlet are described in the online Help. Click to display context sensitive Help for a particular screen.

  5. On the Portlet Type tab:

    1. To specify that users of this portlet can enter search criteria, select Display a search form for users to fill in.

    2. Change the Portlet Header Title if you wish.

  6. Click the What to Search tab to choose which page groups and content type to search:

    1. For What type of content should be searched?, choose whether to search for items, pages, categories, perspectives or any of these.

    2. For Which page groups should be searched?, choose all, or select a subset of page groups.

    For more information see Restricting portal content from a custom search.

  7. Click the Search Criteria tab to predefine a set of conditions for your search:

    1. In Search For, enter a default search term for the query if required.

    2. Select a default operator for the query, such as contain all of the terms, contain any of the terms, contain these terms exactly.

    3. Choose which (if any) of the search submission attributes are needed to define your search query.

    4. Enter a Restriction and Default Value for each selected attribute as required.

      If a search term is not specified (see step 7.1), at least one attribute must have a default value.

    See Search tips.

  8. Click the Search Form tab to specify whether users can override the search criteria you have defined:

    1. Select Search Terms Box, to allow users to enter their own search terms.

    2. Select Search Terms Restriction Selector, to allow users to choose their own operator for the search.

    3. Hide any search attributes that you do not want users to change, by moving them to the Hidden Attributes list.

  9. Click OK.

    The custom search portlet is displayed with your search criteria defined.

Related topics

Setting up the search feature
Interpreting search results
Performing a basic search
Performing an advanced search
Using the custom search portlet
Creating a custom search form
Creating a custom search result page
Restricting portal content from a custom search
Create a portlet that executes a predefined search query
Saving a search
Re-using a saved search
Adding a list of your saved searches to a page
Setting up Oracle Text searching