Oracle® Application Server Portal User's Guide
10g Release 2 (10.1.4) B13809-04 |
|
Previous |
Next |
This chapter explains how to use OracleAS Portal's search portlets. It includes the following subsections:
Intended Audience
The content of this chapter is intended for users with at least the Manage privilege on the pages you will work with. If a particular task requires or can be performed under different privileges, those privileges will be listed before the steps of that task. For more information on page privileges, see Section B.3, "Page and Tab Privileges".
OracleAS Portal offers a number of options for adding search engines to your pages. You can add one of the pre-built search portlets (Basic, Advanced, Custom) or the Oracle Ultra Search portlet. A basic search matches results with search criteria entered into the Search field. An advanced search is a basic search with additional capabilities, such as the ability to limit the search to a specific page group, page, category, and so on.
The Custom Search portlet has a variety of uses. Page designers can create an automatically executed search whose results dynamically populate a search results page, or create custom search forms and custom results pages for a specific customer or user requirement.
For custom searches, you can display search results in the same portlet you used to enter the search criteria, or you can place two Custom Search portlets on two different pages—one for entering search criteria and one for displaying results. This has implications for the set-up values specified for each portlet, see Section 17.3.8, "Defining Separate Portlets for Search Forms and Search Results".
A pre-built Ultra Search portlet is also available. The Ultra Search portlet provides crawling and universal search over all Oracle Ultra Search-supported repositories and this includes the ability to search public content in OracleAS Portal. To make use of the pre-built Ultra Search portlet, OracleAS Portal must be registered as an Oracle Ultra Search content source, and the Ultra Search provider must be registered with OracleAS Portal. As the Ultra Search portlet searches public content only, page designers must ensure that the Display Page to Public Users option is set appropriately on OracleAS Portal pages.
Note: If the Ultra Search portlet is not available in your portlet repository, contact your portal administrator. For more information on how to set up Oracle Ultra Search, see the Oracle Application Server Portal Configuration Guide available on the Oracle Portal documentation page of the Oracle Technology Network athttp://www.oracle.com/technology/products/ias/portal/documentation.html .
|
When you place a Basic or Advanced Search portlet on a page, you can edit some default portlet settings, including the portlet's header title and whether a page group selector is displayed. The page group selector allows users to limit their search to one or more specific page groups.
This section discusses the options that are set at the portlet level. You'll find information about setting options at the administrator level in the Oracle Application Server Portal Configuration Guide, available on the Oracle Portal documentation page of the Oracle Technology Network at http://www.oracle.com/technology/products/ias/portal/documentation.html
.
To edit a Basic or Advanced Search portlet:
Go to the page where you will add the Basic or Advanced Search portlet.
Switch to Edit mode.
Click the Add Portlet icon in the region where you will add the portlet.
If the region already includes items, you cannot add a portlet to the region.
In the Portlet Repository, enter search
in the Search field, and click Go.
In the Portlet Repository Search Results list, click Basic Search or Advanced Search.
Click OK.
Click the Edit Defaults icon associated with the portlet.
Change defaults as desired:
Enter a different Display name. The default is Basic Search or Advanced Search.
Select Show Page Group Selector to enable users of this search portlet to choose which page groups are included in a search. Once this option is selected, a Page Groups field displays in the portlet. Users click the Browse icon next to this field to select one or more page groups.
If this option is not selected, all page groups are searched.
Click OK to save your changes and return to the page.
The Custom Search portlet included with OracleAS Portal allows page builders to define a variety of searches against information uploaded to your portal. Using this portlet, you can define unique search forms, search results pages, and predefined search queries that all meet very specific search requirements.
This section provides information on how to work with Custom Search portlets. It includes the following subsections:
Creating a Portlet that Publishes Search Results Automatically
Defining Separate Portlets for Search Forms and Search Results
To place the Custom Search portlet on a page:
Go to the page where you will add the Custom Search portlet.
Switch to Edit mode.
Click the Add Portlet icon in the region where you will add the portlet.
If the region already includes items, you cannot add a portlet to the region.
In the Portlet Repository, enter custom search
in the Search field, and click Go.
In the Portlet Repository Search Results list, click Custom Search.
Click OK.
The Custom Search portlet is added to the page.
With custom search configuration, some options affect all Custom Search portlets, and some affect only a particular instance of the portlet. The options that affect all search portlets are set at the administrator level. The options for a particular instance of the Custom Search portlet are set at the portlet level.
This section discusses the options that are set at the portlet level. You'll find information about setting options at the administrator level in the Oracle Application Server Portal Configuration Guide, available on the OracleAS Portal documentation page of the Oracle Technology Network at http://www.oracle.com/technology/products/ias/portal/documentation.html
.
To set custom search options at the portlet level:
Go to the page that contains the Custom Search portlet.
Switch to Edit mode.
Click the Edit Defaults icon associated with the portlet.
Edit the custom search options as required.
Five tabs contain the options for the Custom Search portlet:
Portlet Type—Use the Portlet Type tab to generally define the type of Custom Search portlet you will create. See Custom Search - Portlet Type Tab for more information.
What to Search—Use the What to Search tab to specify the type of content and range of page groups (or a page) to be searched. See Custom Search - What to Search Tab for more information.
Search Criteria—Use the Search Criteria tab to enter specific search terms and define filters to further refine your search. See Custom Search - Search Criteria Tab for more information.
Search Form—Use the Search Form tab to design the search form your users will see when you opt to Display a search form for users to fill in (on the Portlet Type tab). See Custom Search - Search Form Tab for more information.
Results Display—Use the Results Display tab to specify a target page for search results. If the portlet will be used to display search results, you can also select display options, including extra services the page will display and the style and layout of the search results. See Custom Search - Results Display Tab for more information.
Click OK.
Use the Portlet Type tab to generally define the type of Custom Search portlet you will create. Table 17-1 lists and describes the Custom Search options that are available on the Edit Defaults: Portlet Type tab.
Table 17-1 Custom Search Options on the Edit Defaults: Portlet Type tab
Option | Description |
---|---|
Display a search form for users to fill in |
Users see a search form in this Custom Search portlet. Whether users can enter and select their own search criteria is dependent on how you configure options on the Custom Search - Search Form Tab. |
Automatically display search results |
Search results from predefined search criteria are displayed in this Custom Search portlet in lieu of a search form. Users cannot change, or customize the search criteria, so use this option for publishing purposes only. The search is defined by options you specify on the Custom Search - What to Search Tab and Custom Search - Search Criteria Tab. The search results are displayed with style settings defined on the Custom Search - Results Display Tab. |
Cache the search results for [ ] minutes |
Search results from an automatic query can be cached. If users access the Custom Search portlet within [ ] minutes after the search was executed, they see a cached version of the original search results. |
Do not cache the search results |
Every time users return to the page where this Custom Search portlet is displayed, the search is re-executed and the results are refreshed. |
Display name |
A display title for the Custom Search portlet. The default is Custom Search. |
Use the What to Search tab to specify the type of content and range of page groups (or a page) to be searched. Table 17-2 lists and describes the options that are available on the Edit Defaults: What to Search tab.
Users cannot override the page group restrictions you define on this tab. However, if the Custom Search portlet displays a search form, you may choose whether users can override the content type and page settings, or further restrict your page group selections, by displaying/hiding these options on the search form (Custom Search - Search Form Tab).
Table 17-2 Custom Search Options on the Edit Defaults: What to Search tab
Option | Description |
---|---|
What type of content should be searched? |
Search results will return any portal object that matches the search criteria, whether it be an item, such as a link to a file or image that contains the search term; or a page, category, or perspective that contains the search term. The selection you make here works with your selection for the Choose type of content to search option, which appears on the Search Form tab. Additionally, it is affected by where you choose to display your results. Results displayed in the same portlet:
Results displayed on a different page: In this scenario, one Custom Search portlet defines the search submission criteria (the search form). A second Custom Search portlet defines how search results are displayed (the search results). The search form portlet and search results portlet are on different pages.
Results displayed automatically:
Summary of Option Values:
|
Search in all page groups, including newly created page groups |
All page groups are included in the search. Choose this if you do not want to place any restrictions on the search. This allows users to search all page groups, including any new ones that may be added to the portal in the future. |
Search in selected page groups |
Only the page groups you select from the Available Page Groups list and add to the Page Groups to Search list may be searched. If you select two or more page groups, only shared attributes may be used for search criteria. |
Which pages should be searched? |
Only the page you select from the list of available pages is searched. You can restrict searches to one page or one or more page groups. When a page is selected, any page group selections are ignored. |
Include sub-pages |
All sub-pages of the selected page may also be searched. |
Use the Search Criteria tab to pre define specific search terms and define filters to further refine your search. Table 17-3 lists and describes the options that are available on the Edit Defaults: Search Criteria tab.
If the Custom Search portlet displays a search form, you may choose whether users can override the search criteria defined here by displaying/hiding the search attributes on the search form (Custom Search - Search Form Tab).
Table 17-3 Custom Search options on the Edit Defaults: Search Criteria tab
Option | Description |
---|---|
Search For |
Enter the term(s) to be searched for. Search terms are not required. For example, if you choose to search for a specific attribute, such as a Create Date, and leave this field blank, all objects within the selected page groups/pages that share that Create Date will display in your search results. On the other hand, if you enter a search term, such as policy, and specify the Create Date, search results will include all objects within the selected page groups/pages that include the word policy and were created on the specified date. Note that if Oracle Text is disabled, only object metadata, that is, the content of their attributes, is searched. See also Section A.2.4, "Base Searchable Attributes". |
By default, find results that |
Indicate how rigorously the search terms you entered into the Search For field should be applied to the search. For example, if you enter three terms, policy, benefit, retirement, and you choose:
When Oracle Text is enabled, a larger set of operators are available for selection. For more detail, see Table 2-1, "Search Operators". Portal administrators can enable/disable Oracle Text on the Global Settings: Search page. For more information, see the Oracle Application Server Portal Configuration Guide, available on the OracleAS Portal documentation page of the Oracle Technology Network at |
Choose Attributes |
Click this link to include additional attributes within the search query. You can hide the selected attributes from search form users, if you wish. When you click this link, an attribute selector is displayed. Move all the attributes you require to the Selected list, then click OK. All the attributes you select are displayed on the:
Users may filter search results using attributes such as: Author, Base Item Type, Category, Character Set, Create Date, Creator, Date Updated, Description, Display Name, Expire Date, File Name, Item Type, Keywords, Last Updated By, MIME type, Name, Perspectives, Publish Date, URL, Version Number. See also Section A.2.4, "Base Searchable Attributes". |
Page Group |
Display only. The name of the page group to which the attribute belongs. This column displays only if a single page group was selected on the What to Search tab. |
Attribute |
Display only. The name of the attribute to be available for use as a search criterion, for example, Create Date, Description, Display Name, and so on. |
Data Type |
Display only. The data type of the attribute. |
Restriction |
Restrict the attribute's relationship to its default value, such as attribute equals default value, attribute contains all default value, and so on. The datatype of the attribute determines the restriction options available. Only values applicable to the datatype are displayed. |
Default Value |
The default search value of the attribute. This column is entitled Value, if Automatically display search results is selected on the Portlet Type tab because the user cannot override the value specified here. There are two special default values: #TODAY#, which is today's date, and #USER#, which is the currently logged in user. Additionally, you can specify #TODAY#+n or #TODAY#-n, where n is an integer. These values are case sensitive. For example, if you want to search for all items created in the last seven days, choose the Create Date attribute, set Restriction to Greater Than, and the Default Value to #TODAY#-7. If you are defining search criteria for an automatic search query and no search term or page group is specified, at least one attribute must have a value. If Oracle Text is enabled, you can choose more than one perspective. You can perform a search that Matches All or Matches Any of the perspectives you select. You can also choose Include Sub-perspectives to extend your search to perspectives beneath the perspectives you have chosen. |
Use the Search Form tab to create the search form your users will see when you opt to Display a search form for users to fill in (Custom Search - Portlet Type Tab). Table 17-4 lists and describes the options that are available on the Search Form tab.
Table 17-4 Custom Search options on the Edit Defaults: Search Form tab
Option | Description |
---|---|
Search terms box |
Select this to enable users to enter their own search terms. |
Search terms restriction selector |
Select this, provided Search terms box is selected, to enable users to place additional restrictions on the search terms. For example, if users enter three terms, policy, benefit, retirement, and you have specified:
If search terms or search operators are defined on the Search Criteria tab, they appear as defaults on the search form. If you choose not to display the search term box or restriction selector, any predefined values become hidden search criteria. |
Choose a page group to search |
Select this to enable users to choose one or more page groups to search. The page groups that appear on the list on the search form depend on the options chosen on the What to Search tab. If you chose:
In both cases, the user can select one or more page groups by moving page groups from the Available list to the Selected list. The heading Search In that displays over this field can be hidden using the Subsection headers option described in the Other Options section of this table. Note that searches can be restricted to one or more page groups or pages. When a page is selected, any page group selections are ignored. If you choose not to display this field and the user does not restrict the search to one or more pages (see next section), the page groups selected on the What to Search tab are searched. If no page groups are selected on the What to Search tab, all page groups are searched. |
Choose a page to search |
Select this to enable users to identify a single page, and, optionally, its sub-pages, to search. Note that searches can be restricted to one or more page groups or pages. When a page is selected, any page group selections are ignored. The list of available pages depends on which page groups are selected on the What to Search tab:
|
Order search results |
Select this to enable users to specify how their search results should be organized, for example, by Score, Create Date, Author, and so on. Users may also select whether results are displayed in Ascending or Descending order. Some of the options in the Order By list may not be applicable to certain search results. In such cases, the particular returned result is ordered by Display Name. For example, the results are ordered by Author and a returned result has no author. |
Set number of results per page |
Select this to enable users to specify how many results should appear on a page. If the number of results exceeds the value specified here, they are placed on additional pages. If the user chooses not to provide a value or this option is not displayed on the search form, the value specified in the search results portlet is used instead. |
Set maximum number of results |
Select this to enable users to limit the number of results returned from a search. |
Choose type of content to search (items, categories, perspectives, or pages) |
Select this to enable users to specify the type of results to return, either categories, perspectives, pages, or items. For this option to take effect, the option What type of content should be searched? must be set to Any on the Custom Search portlet that is being used to display the search results. If it is not, only search results of the chosen content type are returned, and users are not given the option to choose a content type. If it is not set to Any:
|
Search Tips link |
Select this to add a link to the Search Form that provides users with help on how to set up search criteria. |
Advanced Search link |
Select this to display a link on the Search Form that will take users to an advanced search page where they can specify additional search criteria. Advanced Search link details are specified by the portal administrator on the Global Settings: Search page. For more information, see the Oracle Application Server Portal Configuration Guide, available on the Oracle Portal documentation page of the Oracle Technology Network at |
Image |
Select this to display an image with your search form. Choose:
|
Internet Search Engine link |
Select this to display a link to an external search engine, such as Google or Yahoo, on the search form. URL and link text for the external search engine are specified by the administrator on the Global Settings: Search page. For more information, see the Oracle Application Server Portal Configuration Guide, available on the Oracle Portal documentation page of the Oracle Technology Network at |
Reset button |
Select this to display a button that enables users to reset the search criteria. |
Subsection headers |
Select this to display group headings for items displayed on the search form, such as Search In, Filter By, and Results Options. |
Hidden/Displayed Attributes |
Select which attributes to show on the search form.The order of attributes appears to users in the order you set for the Displayed Attributes list. Reorder this list using the arrow icons to the right of the list. Note: The list of attributes available here depend on those chosen on the Search Criteria tab. If the attribute you want to display (or hide) is not available, click the Search Criteria tab and then Choose Attributes. |
Allow users to add extra attributes to the search |
Select this to enable users to specify additional attribute search criteria. Checking this will display the Choose Attributes link on the search form. |
Allow users to choose Match Any/Match All for attributes |
Select this to allow users to set restrictions on attribute searches. Providing that more than one visible attribute is available, selecting this option places two radio buttons on the form:
If these options are not displayed on the search form, the search will return results that match all the attribute search criteria specified. |
Use the Results Display tab to specify a target page for search results. If the portlet will be used to display search results, you can also select display options, including extra services the page will display and the style and layout of the search results. Table 17-4 lists and describes the options that are available on the Edit Defaults: Results Display tab.
Caution: If you do not want to display your search results in This Portlet (see Table 17-5), choose your target search results page (Default or Custom) but do not set any other option on this tab. Whenever you change any of the results display options the target search results page automatically defaults to This Portlet and your original result page selection is removed.When you display search results on a different page from the search form, remember that you must edit options on the Results Display tab of the results portlet and not the search form portlet. See also Section 17.3.8, "Defining Separate Portlets for Search Forms and Search Results". |
Table 17-5 Custom Search options on the Edit Defaults: Results Display tab
Options | Description |
---|---|
Default Search Results Page (Default when displaying a search form) |
Choose this to display the search results on the default Search Results Page. This is the default when the Custom Search portlet displays a search form. The Default Search Results Page is specified by the administrator on the Global Settings: Search page. For more information, see the Oracle Application Server Portal Configuration Guide available on the Oracle Portal documentation page of the Oracle Technology Network at Note: If you select this option, do not set any other option on this tab. If you do, your results page automatically defaults to This Portlet and your page selection is removed. |
Custom Search Results Page [ ] |
Choose this to display search results on a page that you specify. To select a page, click the Browse icon next to the input field. To display search results, the target page must contain a Custom Search portlet. Note: If you select this option, do not set any other option on this tab. If you do, your results page automatically defaults to This Portlet and your page selection is removed. |
This Portlet (only choice when search results are automatically displayed) |
Choose this to display search results in the same portlet from which the search was executed. Notes
|
Bulk action link |
Displays a Bulk Action link along with search results. This allows users to perform actions on multiple objects returned by the search. This link displays only when a search is performed on a single page group. It is not displayed for the Shared Objects page group. Note: This setting applies only to the portlet that is being edited. If your search results are to be displayed by a different Custom Search portlet, then be sure to set a value for this option in the search results portlet. |
Results pagination |
Choose this to display the Previous and Next icons and a results summary so users can view search results on a page-by-page basis. If you choose not to paginate results, the number of results returned is limited to the value you enter in the Show a maximum of [ ] results per page field. Note: This setting applies only to the portlet that is being edited. If your search results are to be displayed by a different Custom Search portlet, then be sure to set a value for this option in the search results portlet. |
Show a maximum of [ ] results per page |
Choose this to specify the maximum number of results returned on a page. This becomes the total allowable number of results returned if Results pagination is not also selected. If you have chosen to allow users to Set maximum number of results (on Search Form tab), the value specified here becomes the default value displayed on the search form. Note: This setting applies only to the portlet that is being edited. If your search results are to be displayed by a different Custom Search portlet, then be sure to set a value for this option in the search results portlet. |
Save search link with link text [ ] |
Choose this to display a Save Search link with the search results. The text you enter here becomes the link text. The default is Save Search. This enables users to save the defined search criteria and rerun the same search without re specifying. Note: This setting applies only to the portlet that is being edited. If your search results are to be displayed by a different Custom Search portlet, then be sure to set a value for this option in the search results portlet. |
Search form with submission criteria |
Choose this to display the search form, along with the last-specified search criteria, on the search results page. This way, users can adjust the criteria and resubmit the search if it didn't yield the desired result. If search results are to be displayed in a portlet other than the one from which the search was submitted, you may want to set the same search form options for both portlets (the search form portlet and the search results portlet). If the portlets are set up differently, some of the original search criteria may not be visible on the results page. For example, if the search form portlet displays a page selector but the results portlet does not, the original page criteria will not be displayed in the results portlet's search form as expected. The one exception here is your search attribute selections. All the search attributes that are displayed on the search form portlet will appear on the results portlet's search form. In this case, the attribute selections on the results portlet are ignored. This option is not available if the Custom Search portlet is set up to display search results automatically. Note: This setting applies only to the portlet that is being edited. If your search results are to be displayed by a different Custom Search portlet, then be sure to set a value for this option in the search results portlet. |
Style |
Select a style for item and page details returned in search results. The default is Main Style. This style does not affect the appearance of the portlet itself or the page that displays the portlet. It only affects the item and page results, that is, their font style, size, color, and so on. Note: This setting applies only to the portlet that is being edited. If your search results are to be displayed by a different Custom Search portlet, then be sure to set a value for this option in the search results portlet. |
Available/Displayed Attributes |
Select the attributes to display alongside item and page search results. Use the Move icons to move them from Available to Displayed Attributes. The order of Displayed Attributes is the order they appear on the search results page. Use the Move icons to the right of this list to rearrange the order of display. Notes: Objects, such as perspectives, that are hidden (at page group level) are not displayed with search results, even if the associated attribute is selected here. Only attributes that are suitable for display alongside search results are available for selection. For more detail, see Section A.2.3, "Base Search Result Display Attributes". Note: This setting applies only to the portlet that is being edited. If your search results are to be displayed by a different Custom Search portlet, then be sure to set a value for this option in the search results portlet. |
Order search results by |
Choose how search results are sorted, that is, by Score, Author, Create Date, Display Name, and so on. Then select whether the display order is Ascending or Descending. Some of the options in the Order By list may not be applicable to certain search results. When this occurs, Order search results by defaults to Title. For example, if a page returned by the search does not have an Author value, and the user chose to order by Author, the Title is used for the search results order. Note: This setting applies only to the portlet that is being edited. If your search results are to be displayed by a different Custom Search portlet, then be sure to set a value for this option in the search results portlet. |
This section discusses the options available on the default Custom Search Form and how you can build your own customized versions. It includes the following subsections:
When you place the Custom Search portlet on a page, you get the default version of the Custom Search Form. You can edit the portlet defaults to display other content in lieu of the form, such as the search results. But the first thing you see, before you edit defaults, is the default version of the Custom Search Form. Table 17-6 lists and describes the elements that make up the default Custom Search Form.
Figure 17-1 The Default Version of the Custom Search Form (Oracle Text Enabled)
Table 17-6 Options Available on the Default Version of the Custom Search Form
Option | Description |
---|---|
Search field and button |
Enter the term(s) you want to search for. Separate terms with spaces. Enclose phrases in quotation marks. Click the Search button to execute the search. |
Find results that |
Use this list to specify how rigorously the search results should match the terms entered in the Search field. For example, if you enter three terms, policy, benefit, retirement, and you choose:
When Oracle Text is enabled, a larger set of operators are available for selection. For more detail, see Table 2-1, "Search Operators". Oracle Text is enabled by default, but portal administrators can enable/disable Oracle Text on the Global Settings: Search page. For more information, see the Oracle Application Server Portal Configuration Guide, available on the Oracle Portal documentation page of the Oracle Technology Network at |
Page Groups |
Use this to limit the range of the search to one or more selected page groups. Click the Browse icon to select from a list of page groups to search. This opens a secondary window where users can move one or more page groups from an Available to a Selected list. By default, all page groups are available. Note that searches can be restricted to one or more page groups or pages. When a page is selected, this Page Groups option is ignored. |
Page |
Use this to select a specific page to search. Clicking the Browse icon opens a secondary window where users may select a page. By default, any page from any page group may be selected. When a page is selected, this Page Groups option is ignored. |
Include sub-pages |
Select this option to include all sub-pages of the selected page in your search. |
Choose Attributes |
Click this link to choose which search attributes are displayed on the search form. Then define attribute values to filter search results. By default, you may filter search results by attributes such as Author, Base Item Type, Category, Character Set, Create Date, Creator, Date Updated, Description, Display Name, Expire Date, File Name, Item Type, Keywords, Last Updated By, MIME type, Name, Perspectives, Publish Date, URL, Version Number. See also Section A.2.4, "Base Searchable Attributes". |
Match All/Any Of The Following |
Use these options to further restrict your search:
|
Perspective Match All / Match Any [ ] |
(Oracle Text enabled) Specify which perspective(s) should apply to search results. Choose Match All or Match Any to perform a search that matches all/any of the perspectives you select. |
Include Sub-perspectives |
(Oracle Text enabled) Select this option to include all sub-perspectives of the perspectives you select. |
Perspective Equals [ ] |
(Oracle Text disabled) Specify which perspective should apply to the search results. |
Category Equals [ ] |
Specify which category should apply to the search results. |
For advice on how to search, read the Search Tips |
Click this link to open a list of tips for refining a search. |
You can create unique search forms that meet very specific search requirements by editing the defaults of a Custom Search portlet. For example, you can determine which actions can be performed by users of the search form and which links, buttons, and headings are displayed on the search form.
To edit the defaults of a Custom Search Form:
Go to the page that contains the Custom Search portlet.
For more information, see Section 17.3.1, "Placing a Custom Search Portlet on a Page".
Switch to Edit mode.
Click the Edit Defaults icon associated with the portlet.
The Edit Defaults: Custom Search page opens. This page includes these five tabs (described fully in the tables earlier):
The following steps highlight those options which affect the search form.
On the Portlet Type tab:
To specify that this portlet must display a search form, select Display a search form for users to fill in.
Change the Display name (portlet title) if you wish.
Click the What to Search tab to pre-select the page groups, pages and content type that may be searched by users of this search form:
For more information see Section 17.3.6, "Restricting Portal Content from a Custom Search".
Click the Search Criteria tab to pre-define a set of conditions for this search form.
If you do not want users to be able to override any, or some of the search criteria chosen here, make sure you hide the associated fields on the search form. You do this by setting display options on the Search Form tab.
For more information see Section 17.3.7, "Setting Search Criteria for a Custom Search Portlet".
Click the Search Form tab to create the search form your users will see:
Select Search term box to enable users to enter their own search terms.
If you want the user to be able to place additional restrictions on the search terms, like Contains all of the terms, select Search terms restriction selector.
In the section Allow users to, select all the actions that want your search form users to be able to perform.
For example, do you want your users to be able to choose which page groups, page or content type is searched? Do they need to control the order in which search results are returned or limit the number of results displayed?
In the section Other Options choose which links, buttons, headings and images are displayed on the search form.
Choose which search attributes appear on the search form and the order in which they are displayed.
Alternatively, hide attributes from your users by moving them to the Hidden Attributes list. If the attribute you want is not listed, first click the Search Criteria tab, the Choose Attributes link and select the missing attribute.
Note: On the search form, a combo box is used to display search attribute values associated with most LOV formats (check box, combo box, radio group, and so on). However a pop up control is used to display LOVs that are defined with the pop up format selected.If you choose to display a custom attribute that is associated with an LOV, make sure that all the value fields (as well as the display name fields) of the LOV are populated. If a value field is empty, there will be no criteria on which to search. |
Select Allow users to add extra attributes to the search to enable users to specify additional attribute search criteria.
Checking this will display the Choose Attributes link on the search form.
Select Allow users to choose Match Any/Match All for attributes to let users set restrictions on search attributes.
Checking this will display two radio buttons on the search form (Match All/Any Of The Following). If these options are not displayed, the search will return results that match all the attribute search criteria specified.
Click the Results Display tab to choose where results from this search form are displayed:
This Portlet, if you choose this option, you can customize how the results are displayed by editing the other display options on this tab.
Default Search Results Page or Custom Search Results Page, when you choose to display results from this search form on a different page, the rest of the display options on this tab do not apply. If you want to customize how search results are displayed on these pages, go to the page, click the Edit Defaults icon associated with its Custom Search portlet and edit the options on the Results Display tab.
Caution: If you do change any of the results display options when Default Search Results Page or Custom Search Results Page is selected, the target search results page automatically defaults to This Portlet and the original result page selection is removed. |
For more information see Section 17.3.4.3, "Customizing Search Results".
Click OK to save your changes and return to the page.
This section discusses the default search results page (for the Custom Search portlet) and describes how you can create new search results pages of your own. This section also explains how you can customize the way results from any Custom Search portlet are displayed on the page:
The Search Results Page is the default results page for Custom Search portlets and it is located in the Portal Design-Time Pages page group. This page displays the results of a search as well as any number of other services you may care to include. The objects displayed in the default Search Results Page (Figure 17-2) are listed and described in Table 17-7.
Figure 17-2 The Default Search Results Page
Table 17-7 Elements of the default Search Results Page
Element | Description |
---|---|
Tabs (Items, Pages, Categories, Perspectives) |
Each tab contains a Custom Search portlet that is set up to display search results for a different type of portal content. When you view results from an automatic search the tabs are not displayed as these searches can only return results of the same content type. |
Items tab |
This tab displays all returned results that are items. Items include files, images, page links, and the like. Users click a result, and the file is opened, the image is displayed, the link is executed, and so on. |
Pages tab |
This tab displays all returned results that are pages. Users click a result, and the page is opened. |
Categories tab |
This tab displays all returned results that are categories. Users click a result, and a page is opened with a list of portal content that is classified under that category. |
Perspectives tab |
This tab displays all returned results that are perspectives. Users click a result, and a page is opened with a list of portal content that is classified under that perspective. |
Results |
This informational field displays the range of results on the current page and the total number of results. |
Save Search |
Users click this button to save the search criteria specified for the current search. Users have the option of adding a Saved Searches portlet to any page. When they click Save Search, the current search criteria is added as a new link in the Saved Searches portlet. In the portlet, they click the link to a particular saved search to rerun the search. |
Result |
The result link jumps to the item, page, category or perspective that matches the search criteria. The user will not see content they are unauthorized to view, content that has expired, items that are not yet published, content that is derived from a template, portlet instance items, Portal Smart Links, or Navigation pages. Such content is not returned in search results. Note that new or recently modified portal content is not returned in search results until such changes are reflected in the Oracle Text search indexes.If your portal is installed in Oracle Database 10g, Oracle Text indexes can be set up to synchronize immediately after portal content is added, updated, or deleted. Contact your portal administrator to learn more about the current synchronization schedule for Oracle Text indexes in your portal. See also Oracle Application Server Portal Configuration Guide. |
Score |
The Oracle Text relevancy score, rating how well each result matches the search criteria. The score is high when terms are found in the title. If there are multiple terms in the title, the result ranks even higher. Weighting is also given when multiple terms are found close together, or when search results contain the most matches. |
Property sheet icon |
Click this icon to view the properties (attribute values) of a particular result, such as its description, its publish date, or its expiration period. |
Result Attributes |
The attributes displayed with each search result are configurable, see Section 17.3.4.3, "Customizing Search Results". The default attributes include the object's Create Date, its page group, and its classification category and perspective(s). |
Search Form |
By default, the Search Results Page displays a search form beneath the search results so that users may alter the search criteria and rerun the search without having to navigate back to the original search form. |
If the default Search Results Page for the Custom Search portlet does not suit your needs, you can create your own page for search results. If you decide to do this, the new page must contain at least one Custom Search portlet. If you want your page to display different types of search results (items, pages, categories, perspectives) you must place additional Custom Search portlets onto tabs like the default Search Results Page. Add one Custom Search portlet on a separate tab for each of the content types your result page must display.
Next you can edit default display options for the portlet(s) to determine how the results appear on your page.
To create and use your own search results page:
Go to the page you have created for your search results and add the Custom Search portlet.
For more information, see Section 17.3.1, "Placing a Custom Search Portlet on a Page".
Customize how search results are displayed on your page:
Click the Edit Defaults icon beside the portlet.
Click the Results Display tab and customize the appearance of search results as desired.
For details, see Section 17.3.4.3, "Customizing Search Results".
Click OK to save your changes and return to the page.
Configure a search form to use your new results page:
Go to the page where the search form is displayed.
Switch to Edit mode, then click the Edit Defaults icon beside the Custom Search portlet.
Click the Results Display tab to choose where results from this search form are displayed.
Select Custom Search Results Page, and pick the search results page you wish to use.
As you have chosen to display your search results on a different page, the rest of the display options on this tab do not apply. The appearance of your search results are determined by settings on your search results page.
Click OK to save your changes and return to the page.
Now, when you submit a search from this search form, the results are displayed on the new page you have specified.
You can use a Custom Search portlet to display results from any Custom Search Form. If the default display options do not suit your requirements you can customize how the results are displayed. For example, you can choose how many results are displayed on each page, as well as the style, layout, and order of the results.
If you choose to display your search form and search results on different pages, note that the style and layout of the search results are controlled by settings within the results portlet and not by settings in the search form portlet. So, if you want to customize the way the results are displayed, you need to edit options for the results portlet and not the search form portlet.
To customize search results:
Go to the page where the search results will be displayed.
This page must contain a Custom Search portlet. It is the results page you chose whilst creating your search form, see Section 17.3.3.2, "Editing the Default Custom Search Form".
For information on locating a page, see Section 9.1, "Locating Pages in OracleAS Portal".
Switch to Edit mode.
Click the Edit Defaults icon beside the portlet.
Click the Results Display tab.
For more information about the options on this tab, see Table 17-5.
Choose Which options should appear with the search results?
Consider whether your users need to be able to save their searches, or perform actions on objects returned by a search. You can also control how many search results are displayed on a page, and limit the number of results that are returned.
Customize the Style used to display item and page search results.
The default is Main Style. This style does not affect the appearance of the portlet itself or the page that displays the portlet. It only affects the item and page results, that is, their font style, size, color, and so on.
Move all the attributes you want to display with item and page search results to the Displayed Attributes list.
Use the Move Up and Move Down icons to change the display order for this additional information and introduce <Blank Line> and <Space> attributes to organize the layout. Section A.2.3, "Base Search Result Display Attributes" describes the attributes that can be displayed alongside search results.
You can display links to associated objects with each search result. For example, users may see links to the page group, page, category and perspective associated with an item. However, note that users clicking on such links will be denied access to the object, if they do not have the required access privileges.
Choose how the search results are sorted, that is, Order Search Results by Score, Author, Create Date, Display Name, and so on. Then select whether the display order is Ascending or Descending.
Click OK to save your changes and return to the page.
The Custom Search portlet is displayed. When you next perform a search, the results are displayed in format you have specified.
Out-of-the-box you can choose to display attributes like Display Name, Author, or Create Date with search results, see Section 17.3.4.3, "Customizing Search Results". You can also use the display attribute Associated Function. This special attribute enables you to further customize the appearance and behavior of search results.
Before using the Associated Function attribute, you must create a custom item type and attach a PL/SQL procedure that will implement the special functionality you require. Next, using settings in the Custom Search portlet, you choose the Associated Function display attribute to implement the procedure in your search results.
To customize search results using custom item types:
Create the PL/SQL procedure that will display your search results in the required way.
For example, you might create a procedure called SHOW_PAGE_FOR_ITEM
that displays a hyperlink (when displayed in item search results) pointing to the page where an item lives, rather than to the item itself.
The Oracle Application Server Portal Developer Kit (PDK) provides a range of PL/SQL APIs you may find useful when creating PL/SQL procedures. For more information, refer to the PL/SQL API Reference documentation available from the Portlet Development page on the Oracle Technology Network at http://www.oracle.com/technology/products/ias/portal/portlet_development_10g1014.html
.
Install the PL/SQL procedure and grant the necessary execute permissions.
If the procedure is installed in a schema other than PORTAL (for example SCOTT) follow these additional steps:
In SQL*Plus, log in to the OracleAS Portal Repository instance as the PORTAL user.
Create synonyms to access the portal procedures, by executing the following script:
$MIDTIER_HOME/portal/admin/plsql/wwc/provsyns.sql
When prompted, enter the schema name, for example SCOTT.
Create synonyms for every OracleAS Portal view used in your procedure.
For example, if your procedure references the view WWSBR_ALL_ITEMS
, execute the command:
create synonym SCOTT.WWSBR_ALL_ITEMS for WWSBR_ALL_ITEMS
;
Create a custom item type to implement your PL/SQL procedure:
Click Navigator, the name of your Page Group and then click Item Types.
Click Create New… Item Type.
Enter an appropriate Name and Display Name, for example Show Item On Page.
Choose Base Text as the Base Item Type and then click Create.
Edit the new item type and click the Procedures tab.
Complete the fields for your procedure:
- Choose PL/SQL as the Type.
- Enter the name of your procedure (pre-fixed with the owning schema) in the Procedure Call field. For example, SCOTT.SHOW_PAGE_FOR_ITEM.
- For Link Text, enter the hyperlinked text to display with the search result. For example, Display Item on the Page.
- Select Display Procedure Results With Item.
- Choose Attributes to pass as parameters to the procedure, if required.
Choose OK.
Make the new item type available to the Custom Search portlet on your search results page.
If you have not done so already, place the Custom Search portlet on the page you have created for your search results. For details, see Section 17.3.1, "Placing a Custom Search Portlet on a Page".
Go to page where your customized search results will be displayed.
In Edit mode, click the Page Group Properties link and choose the Configure tab.
Click the Edit link under Types and Classification.
Move the new item type you just created to the list of Visible Item Types.
Click OK and then Close.
Specify that the custom item type (implementing your procedure) is displayed with each search result:
Click the Edit Defaults icon for the Custom Search portlet.
Choose the Results Display tab.
Move Associated Functions to the Displayed Attributes list and remove any Displayed Attributes that are not required.
Set other display options, as required.
Click OK to save your changes and return to the page.
To test your search result customizations, create one or more text items based on your custom item type.
You can use a Custom Search portlet to publish results from predefined search criteria. Users will not be able to change, or personalize the search criteria, so use this type of portlet for publishing purposes only.
For example, you can create a search portlet that lists items created by a particular user, or one that searches for a list of items that belong to a selected category and that have been modified in the last seven days.
To create a portlet that publishes search results automatically:
Go to the page that contains the Custom Search portlet.
For more information, see Section 17.3.1, "Placing a Custom Search Portlet on a Page".
Switch to Edit mode.
Click the Edit Defaults icon beside the portlet.
On the Portlet Type tab:
Select Automatically display search results.
With this option, users are not able to enter their own search criteria. Instead, the search results appear automatically when the portlet is displayed.
To cache the results from the automatic query, enter the length of time in minutes that the portlet content is cached.
The default is 10 minutes.
Select Do not cache the search results to disable caching. This means that a new search will be executed every time the page containing the portlet is displayed and the results are refreshed.
Change the Display name if you wish.
Click the What to Search tab to choose the page groups, pages, and content type to be searched:
For What type of content should be searched?, choose whether to search for items, pages, categories, or perspectives.
The Any option does not apply when you publish search results automatically; only one content type can be returned.
For Which page groups should be searched?, choose all, or select a subset of page groups.
Alternatively, choose Which pages should be searched? Click the Browse icon to view the list of available pages and choose a page for this search. To exclude sub-pages from the search, do not select the Include sub-pages option.
You can restrict searches to one or more page groups, or a page. When a page is selected, all page group selections are ignored.
For more information see Section 17.3.6, "Restricting Portal Content from a Custom Search".
Click the Search Criteria tab to define a set of conditions for your search:
In Search For, enter a search term for your search query if required.
Optionally, select a default operator for the query, such as contain all of the terms, contain any of the terms, contain these terms exactly. If Oracle Text is enabled in your portal, a larger set of operators will be available. For more detail, see Table 2-1, "Search Operators".
Click Choose Attributes to specify which (if any) of the search attributes are needed to define your search query.
Enter a Restriction and Value for each selected attribute as required.
If neither a search term or page group is specified, at least one attribute must have a value.
Note that none of the options on the Search Form tab apply when the Custom Search portlet is being used to publish search results.
Click the Results Display tab to define how the results are displayed:
For Order search results by, choose the order in which the results are displayed.
Customize how your search results are displayed, as required.
For more information, see Section 17.3.4.3, "Customizing Search Results".
Click OK to save your changes and return to the page.
When the Custom Search portlet is displayed, it executes the search query you have specified and automatically displays the results in the same portlet.
The Custom Search portlet enables you to restrict the portal content that is included during a search. For example, you can create a portlet that allows users to search for items only, in one specific page group.
Users may not override any page group restrictions that you may impose. However, if the Custom Search portlet displays a search form, you can choose whether users can override your content type and page restrictions, or further restrict your page group selections, by displaying/hiding these options on the search form (see Editing the Default Custom Search Form).
To restrict portal content from a Custom Search:
Go to the page that contains the Custom Search portlet.
For more information, see Section 17.3.1, "Placing a Custom Search Portlet on a Page".
Switch to Edit mode.
Click the Edit Defaults icon beside the portlet.
Click the What to Search tab to choose which page groups, pages, and content type can be searched:
For What type of content should be searched?, restrict the search to items, pages, categories, or perspectives.
Alternatively, allow any of these.
If the results are to be displayed in a different portlet, and the Search Results Page is set up to display a particular type of content, the setting for the Search Results Page overrides the content type selected in the Search Form. The user can search only for the type of content that is selected in the Search Results Page.
For Which page groups should be searched?, move all the page group(s) allowed to be searched to the Page Groups to Search list.
If you do not want to restrict the search and want users to be able to search in any new page groups that may be added to the portal, select Search in all page groups, including newly created page groups.
Alternatively, choose Which pages should be searched? Click the Browse icon to view the list of available pages and choose a page for this search. To exclude sub-pages from the search, do not select the Include sub-pages option.
You can restrict searches to one or more page groups, or a page. When a page is selected, all page group selections are ignored.
Click the Search Form tab:
Select Choose a page group to search to allow the user to further restrict which page groups are searched.
The list of available page groups displayed when the user clicks the Browse icon are those selected on the What to Search tab. If you want the user to always search in all the page groups you have selected, do not select this option.
Alternatively, select Choose a page to search to allow the user to select which page is searched.
Select Choose type of content to search to allow the user to restrict the search to items, categories, perspectives, or pages.
For this option to take effect, the Custom Search portlet setting What type of content should be searched? must be set to Any, on the What to Search tab. If it is not, only search results of the chosen content type are returned. The user is not given the option to choose a content type.
Click OK to save your changes and return to the page.
The Custom Search portlet will only return search results from the portal content you have defined.
The Custom Search portlet enables you to define searches that return results that match a set of predefined conditions. You can predefine a set of conditions, so that they appear on the search form when it is displayed in the portlet. If your Custom Search portlet displays a search form, users can override the search criteria that you define.
Alternatively, you may want to hide search conditions from portlet users so 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.
Note: If an object specified within your search criteria is promoted, moved, or deleted, the search criteria is not updated automatically. For example, if your search criteria includes a category that has been deleted, the category continues to be included in the search until someone explicitly removes it from the search criteria. No error message is displayed; the invalid object is simply ignored. |
To set search criteria for a Custom Search portlet:
Go to the page that contains the Custom Search portlet.
For more information, see Section 17.3.1, "Placing a Custom Search Portlet on a Page".
Switch to Edit mode.
Click the Edit Defaults icon beside the portlet.
On the Portlet Type tab:
To allow users of this portlet to enter search criteria, select Display a search form for users to fill in.
Change the Display name if you wish.
Click the What to Search tab to choose which page groups, pages, and content type to search:
For What type of content should be searched?, choose whether to search for items, pages, categories, perspectives, or any of these.
For Which page groups should be searched?, choose Search in All Page Groups, or select a subset of page groups.
Alternatively, choose Which pages should be searched? Click the Browse icon to view the list of available pages and choose a page for this search. To exclude sub-pages from the search, do not select the Include sub-pages option.
You can restrict searches to one or more page groups, or a page. When a page is selected, all page group selections are ignored.
For more information see Section 17.3.6, "Restricting Portal Content from a Custom Search".
Click the Search Criteria tab to predefine a set of conditions for your search:
In Search For, enter a default search term for the query if required.
Optionally, select a default operator for the query, such as contain all of the terms, contain any of the terms, contain these terms exactly. If Oracle Text is enabled in your portal, a larger set of operators will be available. For more detail, see Table 2-1, "Search Operators".
Click Choose Attributes to specify which (if any) of the search attributes are needed to define your search query.
All the attributes you select are displayed on the Search Form tab. From there you can control whether the selected attributes are displayed on the search form, or hidden from the user.
Enter a Restriction and Default Value for each selected attribute as required.
With automatic search queries, at least one attribute must have a default value if no search term or page group is specified.
If Oracle Text is enabled you can choose more than one perspective. You can perform a search that Matches All or Matches Any of the perspectives you select and if you choose Include Sub-perspectives you can extend your search to perspectives beneath the perspectives you have chosen.
Click the Search Form tab to specify whether users can override the search criteria you have defined:
Select Search terms box, to allow users to enter their own search terms.
Select Search terms restriction selector, to allow users to choose their own operator for the search.
Hide any search attributes that you do not want users to change, by moving them to the Hidden Attributes list.
Click OK to save your search criteria and return to the page.
The Custom Search portlet is displayed with your search criteria defined.
You can configure a Custom Search portlet to submit search criteria to another, separate Custom Search portlet that displays the search results. If you do this, you must configure both portlets. Some configuration values are passed from the search submission portlet to the search results portlet, while others are not. Table 17-8 lists and explains the configuration settings that are passed over and those that are not.
To understand Table 17-8, imagine the following scenario:
Page A hosts Custom Search portlet A, which is set up to submit search criteria.
Page B hosts Custom Search portlet B, which is used to display results from search criteria defined in portlet A.
Table 17-8 Sharing of options between Custom Search form and results portlets
It is also important to understand how page group/page selection is resolved when a separate Custom Search portlet is used to display search results and the page groups/page selected on the two portlets do not match. Remember that you can select page groups/pages in two different places, on the Edit Defaults: What to Search tab and on the search form itself.
For example, if page groups PG1 and PG2 are selected in Portlet A, but the results Portlet B is configured to search:
a subset of these (PG2), then the common page groups are searched, that is, PG2.
different page groups (PG3 and PG4), then result Portlet B settings are used, that is, PG3 and PG4.
any page groups (nothing selected), then Portlet A settings are used, that is, PG1 and PG2.
Similarly, if Portlet A has no page groups selected, then results Portlet B settings are used. If a page group mismatch does occur, a message is displayed to warn the user that the page group selections on both portlets do not match.
Page selections are resolved slightly differently. If a page is selected in Portlet A, the page must reside within the set of searchable page groups (resolved using the rules described previously). Otherwise, no results are returned.
If you want the results on Portlet B to match the page group/page selection in Portlet A, ensure that the options set on Portlet A are a subset or the same as those on Portlet B. Alternatively, do not place any page group restrictions on the results portlet (choose Search in all page groups, including newly created page groups in the results portlet). See Table 17-2, "Custom Search Options on the Edit Defaults: What to Search tab".
My Search portlet displays an advanced search link. Can I change the destination of this link?
Your portal administrator determines the destination of the advanced search link. The advanced search link can be to an external site, another portal page, or a package call within OracleAS Portal. As this is a global setting, any changes to the link will be applied to both new and existing search portlets that display an advanced search link. For more information, refer to the Oracle Application Server Portal Configuration Guide available on the Oracle Portal documentation page of the Oracle Technology Network at http://www.oracle.com/technology/products/ias/portal/documentation.html
.
My Search portlet displays an Internet search link. Can I change the destination of this link?
Your portal administrator determines the destination of the Internet search link and the link text that users click to access the specified Internet search engine. As this is a global setting, any changes to the link will be applied to both new and existing search portlets that display an Internet search link. For more information, refer to the Oracle Application Server Portal Configuration Guide available on the Oracle Portal documentation page of the Oracle Technology Network at http://www.oracle.com/technology/products/ias/portal/documentation.html
.
Is it possible to add or remove options on Basic and Advanced Search portlets? Neither portlet seems to offer the search features that I need.
The Basic Search and Advanced Search portlets offer few editable options or personalizations; you may change only the portlet title and show/hide the page group selector. If you want a search form that offers a combination of basic/advanced search features, use a Custom Search portlet. The Custom Search portlet is fully customizable, so you can choose what is displayed on the search form.
I changed some search result display settings and now my search portlet does not work properly.
If you change search results settings for a Custom Search portlet (Edit Defaults: Results Display tab) and then it does not display results from another search portlet, it is probably because the search results page setting of the Custom Search portlet was reset to This Portlet. Whenever you change display options on the Results Display tab the target search results page automatically defaults to This Portlet, overriding the original result page selection (Default Search Results Page or Custom Search Results Page).
Check the Results Display tab settings to see if this is the problem and then restore your results page selection (Default Search Results Page or Custom Search Results Page).
I don't see my newly created category listed in the Filter By criteria.
Newly created categories are not always immediately visible in the Filter By section of the Advanced or Custom search forms, usually as a result of caching issues. To invalidate the cache for the portlet in View mode, click the Personalize link, then click OK. In Edit mode, click the Edit Defaults icon and then OK.
The Search page group selection box does not seem to be working properly. Some page groups are not displayed and some display incorrectly.
If the name of a page group contains one or more commas it does not display properly in search-related page group selection boxes. This is because the comma character is used as the delimiter between page group names. For example, a page group named Sales, London, UK
, might appear as three, separate, selectable page group names instead of just a single page group. The extra, invalid page group entries get displayed instead of valid page groups and therefore you might also find that some page groups appear unavailable. Report your problem to the page group administrator. Page group administrators are advised not to use commas within page group names due to this issue.
When I place the Ultra Search portlet on a page it displays the error message: WKG17005: connection failure: data source does not exist.
Contact your portal administrator. If you want to use the Ultra Search portlet, OracleAS Portal must be registered as an Oracle Ultra Search content source, and the Ultra Search provider must be registered with OracleAS Portal. For more information, refer to the Oracle Application Server Portal Configuration Guide available on the Oracle Portal documentation page of the Oracle Technology Network at http://www.oracle.com/technology/products/ias/portal/documentation.html
.