Oracle® Secure Enterprise Search Administration API Guide 11g Release 1 (11.1.2.2) Part Number E21606-01 |
|
|
PDF · Mobi · ePub |
This chapter describes the object types in the Oracle SES Administration API. It contains these topics:
alert altWord
clustering clusterTree crawlerSettings
identityPlugin index indexOptimizer
partitionConfig proxyLogin
queryConfig
resultList
schedule searchAttr skinBundle source sourceGroup sourceType spaceCalculator storageArea suggLink
task thesaurus
Table 2-1 identifies the document formats supported by Oracle SES.
Document Format | MIME Type |
---|---|
Adobe Framemaker Document |
application/x-framemaker |
Adobe Framemaker Interchange Format (MIF) Document |
application/vnd.mif |
Corel Presentations Document |
application/vnd.corel-presentations |
DICOM Image |
application/dicom |
DocuShare Ichitaro Document |
application/x-js-taro |
GIF Image |
image/gif |
GNU ZIP Archive |
application/x-gzip |
Haansoft HWP Document |
application/x-hwp |
HTML |
text/html |
JPEG 2000 Image |
image/jp2 |
JPEG Image |
image/jpeg |
Lotus 1-2-3 Document |
application/x-lotus123 (also represents application/vnd.lotus-1-2-3) |
Lotus AMI Pro Document |
application/x-ami |
Lotus Freelance Document |
application/x-freelance (also represents application/vnd.lotus-freelance) |
Lotus Word Pro Document |
application/vnd.lotus-wordpro |
LZH Archive |
application/x-lzh-compressed |
Microsoft Excel Document |
application/x-msexcel (also represents application/vnd.ms-excel and application/ms-excel) |
Microsoft Office Project |
application/vnd.ms-project |
Microsoft PowerPoint Document |
application/x-mspowerpoint (also represents application/vnd.ms-powerpoint) |
Microsoft Visio |
application/vnd.visio |
Microsoft Word Document |
application/msword |
Microsoft Works Word Processor Document |
application/x-msworks-wp |
MS Write |
application/x-mswrite |
PDF Document |
application/pdf |
Plain Text |
text/plain |
Quattro Pro for Windows Document |
application/x-quattro-win |
Rich Text Format (RTF) Document |
application/rtf |
StarOffice Calc Document |
application/vnd.stardivision.calc |
StarOffice Impress Document |
application/vnd.stardivision.impress |
Sun XML Writer Document |
application/vnd.sun.xml.writer |
TIF Image |
image/tiff |
WordPerfect 5.1 Document |
application/wordperfect5.1 |
WordPerfect 6 Document |
application/x-wordperfect6 |
XML |
text/xml |
XyWrite Document |
application/x-xywrite |
ZIP Archive |
application/zip |
Oracle SES provides localization support for source documents, metadata translation, and user queries. You can specify this information in the configuration of administration objects.
Oracle SES user interface components are translated into the languages listed in Table 2-2. The locale of the Oracle SES host system sets the default language for error messages, as well as the Administration GUI and the Search Application. In the Web services interface, you can set the language for error messages in individual operations.
For Oracle SES to crawl and index source documents, they must be stored in a supported language and character set.
Table 2-3 lists the codes for languages supported by the crawler.
Language | Code |
---|---|
Arabic |
|
Chinese |
|
Czech |
|
Danish |
|
Dutch |
|
English |
|
Finnish |
|
French |
|
German |
|
Greek |
|
Hebrew |
|
Hungarian |
|
Italian |
|
Japanese |
|
Korean |
|
Norwegian |
|
Polish |
|
Portuguese |
|
Romanian |
|
Russian |
|
Slovak |
|
Spanish |
|
Swedish |
|
Turkish |
|
Table 2-4 lists the codes for character sets supported by the crawler.
Table 2-4 Crawlable Character Sets
Character Set | Code |
---|---|
Standard UTF-8 |
|
16-Bit UCS Transformation Format |
|
Big 5 Traditional Chinese |
|
CNS 11643 Traditional Chinese |
|
GB 18030 Simplified Chinese |
|
GB2312-80 Simplified Chinese |
|
GBK Simplified Chinese |
|
ISO Latin/Arabic |
|
ISO Latin/Cyrillic |
|
ISO Latin/Greek |
|
ISO Latin/Hebrew |
|
ISO Latin-1 |
|
ISO Latin-2 |
|
ISO Latin-3 |
|
ISO Latin-4 |
|
ISO Latin-5 |
|
Japanese (Auto-Detect) |
|
Japanese (EUC) |
|
Japanese (JIS) |
|
Japanese (Shift-JIS) |
|
KSC5601 Korean |
|
Macintosh Arabic |
|
Macintosh Croatian |
|
Macintosh Cyrillic |
|
Macintosh Dingbat |
|
Macintosh Greek |
|
Macintosh Hebrew |
|
Macintosh Iceland |
|
Macintosh Latin-2 |
|
Macintosh Roman |
|
Macintosh Romania |
|
Macintosh Symbol |
|
Macintosh Thai |
|
Macintosh Turkish |
|
Macintosh Ukraine |
|
PC Arabic |
|
PC Baltic |
|
PC Canadian French |
|
PC Cyrillic |
|
PC Greek |
|
PC Hebrew |
|
PC Icelandic |
|
PC Latin-1 |
|
PC Latin-2 |
|
PC Modern Greek |
|
PC Nordic |
|
PC Original |
|
PC Portuguese |
|
PC Russian |
|
PC Turkish |
|
Windows Arabic |
|
Windows Baltic |
|
Windows Cyrillic |
|
Windows Eastern Europe/Latin-2 |
|
Windows Greek |
|
Windows Hebrew |
|
Windows Japanese |
|
Windows Thai |
|
Windows Turkish |
|
Windows Vietnamese |
|
Windows Western Europe/Latin-1 |
|
The names of some administration objects are displayed to users in the Search interface, such as source
, sourceGroup
, and clusterTree
. You can provide a display name in one or more languages by using the <search:translations>
element, as shown here:
<search:name> <search:translations> <search:translation> <search:translatedValue>
Element Descriptions
Name of the administration object.
Contains one or more <search:translation>
elements.
Contains a <search:translatedValue>
element.
Attribute | Value |
---|---|
language |
A code identifying the language of the translated value. The codes are not case sensitive. See Table 2-5, "Query Language Codes". |
Contains a description of the object in the translation language. This value is displayed in the Search Application.
Table 2-5 Query Language Codes
Language | Code |
---|---|
Arabic |
|
Catalan |
|
Chinese, Simplified |
|
Chinese, Traditional |
|
Czech |
|
Danish |
|
Dutch |
|
English |
|
Finnish |
|
French |
|
German |
|
Greek |
|
Hebrew |
|
Hungarian |
|
Italian |
|
Japanese |
|
Korean |
|
Norwegian |
|
Polish |
|
Portuguese |
|
Portuguese, Brazilian |
|
Romanian |
|
Russian |
|
Slovak |
|
Spanish |
|
Swedish |
|
Thai |
|
Turkish |
|
The Administration API provides an encryption system to safeguard sensitive information, such as passwords, contained in the XML description of an object.
When you import an XML document using an operation such as create or update, you can indicate in the XML whether a value is encrypted. In this example, the password is in plain text, which either sets it for the first time or changes it to a new value:
<search:password encrypted="false">password</search:password>
Oracle SES stores the password in an encrypted form. The next example shows an encrypted password, which was exported in an XML document from Oracle SES:
<search:password encrypted="true"> 128b6b43091659ffa1ff068666b8eb6445dabd361871b6a5b97941f00ee8c842e76bcc1eb3c0806fd0f6ee2e3ab371febcf053255ffd4e46888909cdd553914bfabe99eda51861d7 </search:password>
When exporting an XML document containing a password, Oracle SES requires you to provide an encryption key. If you use this document as input to an operation (encrypted="true"
), then you must use the same encryption key as the export
operation so that Oracle SES can decrypt the password.
Both universal and creatable objects can have state properties. The getState
, getStateList
, and getAllStates
commands return an XML document describing the current state of one or more objects.
The <search:state>
element describes the current state of an object.
<search:state> <search:objectStates> <search:objectState> <search:objectState> <search:objectType> <!-- For creatable objects --> <search:objectKey> <search:keyPairs> <search:keyPair> <search:name> <search:value> <!-- For all objects --> <search:stateProperties> <search:stateProperty> <search:propertyName> <search:propertyValues> <search:propertyValue> <search:propertyValue>
Element Descriptions
Contains a <search:objectStates>
element.
Attribute | Value |
---|---|
productVersion |
Oracle SES product version |
xmlns:search |
Namespace for the Oracle SES Administration API |
Contains one or more <search:objectState>
elements.
Describes the state properties of a particular object, using these child elements:
<search:objectType> <search:objectKey> <search:stateProperties>
Contains an object type with one or more state properties:
clustering clusterTree identityPlugin index indexOptimizer resultList schedule skinBundle spaceCalculator task
Contains the object key that identifies a specific instance of a creatable object type. It contains a <search:keyPairs>
element.
Contains one or more <search:keyPair>
elements.
Contains these child elements:
<search:name> <search:value>
Contains a key name for this object type.
Contains the key value for this object.
Contains one or more <search:stateProperty>
elements.
Contains a <search:propertyName>
element.
Contains the name of a property.
Contains one or more <search:propertyValue>
elements.
Contains a <search:value>
element.
Attribute | Value |
---|---|
key |
Provides additional context, such as the name of the data source associated with the property for a schedule that crawls multiple sources. |
Contains the current value of the property.
You can optimize query performance of large document sources by storing the crawler index in partitions distributed across several independent disks. Oracle SES then executes parallel subqueries automatically against the partitions. Both I/O and CPU resources are used in parallel.
These administrative objects support parallel query:
Note:
To support parallel query, you must create the partitions immediately after installing Oracle SES. You cannot create them after crawling a document source.To support parallel query:
Open a SQL session as the administrative user:
sqlplus eqsys
Execute two PL/SQL procedures to enable the partitioning feature of the Oracle SES instance:
exec eq_adm.use_instance(1) exec eq_par.enable_partition
Define one or more storageArea
objects with a usage of PARTITION
on each physical storage device available to this instance.
Update the partitionConfig
object to have a rule type of HASH
and to use the new storageArea
objects.
Create document sources and schedule them for crawling.
This example creates two partitions, using the default OES storage area and a newly created OES1 storage area:
Using searchadmin
, export the XML description of the default OES storage area to a file named oes.xml:
export storageArea --NAME=oes --OUTPUT_FILE=oes.xml
Export the XML description of the partition configuration to a file named part.xml:
export partitionConfig --OUTPUT_FILE=part.xml
Open oes.xml in a text editor and edit it as follows:
<search:config productVersion="11.1.2.2.0" xmlns:search="http://xmlns.oracle.com/search"> <search:storageAreas> <search:storageArea> <search:name>OES1</search:name> <search:description> Default storage area extension </search:description> <search:usage>PARTITION</search:usage> <search:locations> <search:location> <search:path>/ses_storage/</search:path> <search:device>default</search:device> <search:preAllocatedSpace>20</search:preAllocatedSpace> <search:quota>400</search:quota> </search:location> </search:locations> </search:storageArea> </search:storageAreas> </search:config>
Open part.xml in a text editor and edit it as follows:
<search:config productVersion="11.1.2.2.0" xmlns:search="http://xmlns.oracle.com/search"> <search:partitionConfig> <search:partitionRules> <search:partitionRule> <search:partitionValue>EQ_DEFAULT</search:partitionValue> <search:valueType>META</search:valueType> <search:ruleType>HASH</search:ruleType> <search:storageArea>oes, oes1</search:storageArea> </search:partitionRule> </search:partitionRules> </search:partitionConfig> </search:config>
Create the new storage area:
create storageArea --NAME=oes1 --INPUT_FILE=oes.xml
Update the partition configuration:
update partitionConfig --INPUT_FILE=part.xml --UPDATE_METHOD=overwrite
Oracle SES uses quotas to restrict the amount of disk space that it consumes. These administrative objects set and enforce these quotas:
A quota is set on the default data storage location as a post- installation step, computed as half the remaining disk space plus its initial size. You can alter this quota and set quotas on other storage areas.
See Also:
See "Managing Disk Space Usage" in the Oracle Secure Enterprise Search Administrator's GuideTo set a disk space quota:
Identify the storage area that you want to create or modify.
In the XML description of the object, set the <search:quota>
element to the maximum desired size in megabytes.
Use the create
, createAll
, update
, or updateAll
operation to create or modify the object.
Configure the space calculator to run at the desired intervals.
The space calculator is set initially to run daily and is activated automatically. It issues a warning if a quota is 80% filled, or an alert if a quota is exceeded.
You can see alerts on the Home - General page of the Administration GUI, or by issuing an exportAll alert
operation. You must clear an alert before normal operations can resume.
To clear an alert:
Remove the cause of the alert, such as by increasing the quota or removing files from the storage area.
Start the space calculator to check the storage area size against the quota again.
The space calculator changes the alerts to RESOLVED
if the storage area is within the quota. Otherwise, the alert remains OPEN
.
Start the resumeAllSpaceConsumingTasks
task to resume normal operation.
Tip:
You can delete crawler logs and cache files. If this does not free enough space, you can create a storage area on another disk for the crawler to use. The crawler stores data in Oracle data files (*.dbf), which you should not delete at the operating system level.To remove a storage area quota:
In the XML description of the object, set the <search:quota>
element to -1
.
Use the update
or updateAll
operation to modify the object.
This example changes the default quota on the data storage location:
Export the data storage object to a file named datastore.xml:
export storageArea --NAME="Data storage location" --OUTPUT_FILE=datastore.xml
Open datastore.xml in an XML or text editor and change the value of the <search:quota>
element as desired. This example sets it to 64 GB (64*1024 MB).
<search:quota>65536</search:quota>
Save and close datastore.xml.
Update the changes for this storage area:
update storageArea --NAME="Data storage location" --INPUT_FILE=datastore.xml --UPDATE_METHOD=overwrite
Check the current disk usage:
start spaceCalculator
The next example clears an alert signalled by the space calculator.
Fix the cause of the alert. In this example, a new Web source was defined with an unlimited crawling depth. The solution was to limit the crawling depth of the Web source and increase the quota on the data storage location to accommodate the additional crawled documents.
Start the space calculator:
start spaceCalculator
Check the status of the alert on the Oracle Administration GUI or by exporting the alert:
export alert --NAME=alert_1
This XML description shows that the problem is resolved:
<?xml version="1.0" encoding="UTF-8"?> <search:config productVersion="11.1.2.2.0" xmlns:search="http://xmlns.oracle.com/search"> <search:alerts> <search:alert> <search:name>alert_1</search:name> <search:time>Thu, 14 Jan 2010 15:38:21 GMT</search:time> <search:type>SPACE</search:type> <search:status>RESOLVED</search:status> <search:causes> <search:cause location="/home/oracle/dbs/sesmain/" quota="4" size="293" storageArea="Data storage location" time="14 Jan 2010 09:38:21"/> </search:causes> </search:alert> </search:alerts> </search:config>
Resume normal operations:
start task --NAME=resumeAllSpaceConsumingTasks
You can alter the look and feel of the Search application by creating a custom "skin" -- or user interface -- with different graphics, fonts, and colors. The files composing a custom skin are called, collectively, a skin bundle.
All of the files associated with the Search application user interface for a particular release are supplied in a support bundle. These files include FreeMarker templates, images, style sheets, and JavaScript libraries.
The templates that you modify or replace are included in your skin bundle. When Oracle SES does not find a template file in the skin bundle that is needed to display a page in the Search application, then it uses the template file in the support bundle.
Both support bundles and skin bundles are associated with a particular release. This association enables you to migrate skin bundles to future releases of Oracle SES, even though the default user interface might change. When rendering the Search application pages, Oracle SES can still combine files from the skin bundle with files in the support bundle for the same release.
The current support bundle is located in this directory:
ORACLE_HOME/search/data/queryapp/support/11_1_2_0_0
FreeMarker is an open-source tool that generates text from templates. The templates replace HTML files for generating a page in a browser. Oracle SES uses FreeMarker to isolate the look-and-feel of the Search Application from the search software.
The FreeMarker templates are located in the templates directory of the support bundle and have an ftl extension to the file name, such as templates/results.ftl. Before editing the template files, you should become familiar with FreeMarker.
See Also:
FreeMarker Web site athttp://www.freemarker.org/
.The templates contain HTML and two other types of tags:
FreeMarker tags: These tags are predefined in FreeMarker and begin with <#
. For example, this tag appears at the beginning of most templates:
<#import "/lib/oracle.com/seslib.ftl" as ses>
The FreeMarker Manual describes these tags, which invoke predefined directives, at http://freemarker.org/docs/ref_directives.html
.
Oracle SES tags: These tags are specific to Oracle SES and begin with <@
. For example, this tag references a graphic file named logo.gif in the skin bundle:
<@ses.skin_asset 'images/logo.gif'/>
Oracle SES tags invoke macros (also called user-defined directives) defined in seslib.ftl, so any template that uses them must import that file. The Oracle Secure Enterprise Search Administrator's Guide describes these macros.
Cascading style sheets, graphics, and JavaScript files are assets. You can revise an asset file from the support bundle like a template file, or you can create your own custom asset files.
When using custom asset files, you must include references to them using macros within standard HTML. For example, you might create a style sheet named mystyles.css with redefined tags from the support bundle, then include it in your skin bundle templates with a tag like the following. Note the use of the <@ses.skin_asset>
macro, which identifies the location of mystyles.css in the skin bundle.
<link rel="stylesheet" type="text/css" href="<@ses.skin_asset filename='css/mystyles.css'/>">
Similarly, the next tag references a graphics file named mylogo.gif:
<img src="<@ses.skin_asset filename='images/mylogo.gif'/>" ALT="Example, Inc."/>
Alternatively, you might copy search.css and oraclelogo_medium.gif into your skin bundle and modify their contents. Then you would modify references to these files to use the <@ses.skin_asset>
macro, which points to the version of the asset in your skin bundle instead of the file in the support bundle.
Tip:
To trace the styles formatting a particular element on the page, use the development tools of your browser, such as the Firebug extension to Mozilla Firefox, the Inspect Element tool in Google Chrome, or the Developer Toolbar extension to Microsoft Internet Explorer.The Oracle SES 11.1.2.2.0 support bundle contains two JavaScript libraries:
Yahoo! User Interface (YUI) Library: A set of utilities and controls for building interactive Web applications.
Bubbling Library extension to YUI: A set of plug-ins and widgets.
See Also:
YUI Library section of the Yahoo! Developer Network site at http://developer.yahoo.com/yui/
.
Bubbling Library Web site at http://bubbling-library.com/
.
The support library contains a file named seslib.ftl that references all of the resources available to the templates: JavaScript files, style sheets, macros, and so forth. The Freemaker templates import seslib.ftl using this tag at the top of each file:
<#import "/lib/oracle.com/seslib.ftl" as ses>
The tag makes these resources available for use in the template. You can delete the tag if you do not need these resources to generate a particular page, but do not modify the file.
Configuration settings for the Search application are stored in <variable>
elements in this file:
ORACLE_HOME/search/tools/weblogic/deploy/plans/QueryPlan.xml
The Oracle Secure Enterprise Search Administrator's Guide describes these settings. After making any changes, issue the following shell command from Linux and UNIX-based operating systems:
sh $ORACLE_HOME/search/tools/weblogic/deploy/deployer.sh -serverURL t3://host:port/ -user weblogic -password password -name search_query -plan $ORACLE_HOME/search/tools/weblogic/deploy/plans/QueryPlan.xml -process redeploy
Or run this batch file from Windows:
%ORACLE_HOME%\search\tools\weblogic\deploy\deployer.bat -serverURL t3://host:port/ -user weblogic -password password -name search_query -plan %ORACLE_HOME%\search\tools\weblogic\deploy\plans\QueryPlan.xml -process redeploy
Where:
host:port is the host name and WebLogic service port, such as example:7777
. This is the same port that you use to open the Administration GUI.
password is the password for eqsys
.
To assemble the skin bundle files:
Decide on the changes to make to the Search application, such as replacing the logo or the icons, changing the default font or background color, or adding an RSS feed.
Create the following directory structure for storing the files composing the skin bundle:
/skinBundle_name
/templates
/assets
/images
/css
/js
Identify the template files that render the changed pages.
For descriptions of the template files, see the Oracle Secure Enterprise Search Administrator's Guide.
Copy the ftl files from the support bundle for the current release of Oracle SES into the templates directory. Do not change the names of these files.
Modify the templates as desired, using a text editor. Templates can include HTML tags, FreeMarker tags, and Oracle SES tags. You can change text and various settings, and reference custom graphics, style sheets, and JavaScript. See "FreeMarker Templates".
Create the graphic files, cascading style sheets, and JavaScript files as desired. Copy the graphics files into the images directory, the cascading style sheets into the css directory, and the JavaScript files into the js directory.
Create an XML document that describes the skin bundle. See skinBundle.
To create a skinBundle
object using the command-line API:
Assemble the files composing the skin bundle, as previously described.
Create a text file that lists all of the files in the skin bundle. See the Notes for create skinBundle.
Issue a create
command to create the skinBundle
object.
To create a skinBundle
object using the Web service API:
Assemble the files composing the skin bundle, as previously described.
Compose the SOAP message for a create
operation, as described in Chapter 4, "Web Service Operations." Include an <attachments>
element for each file in the skin bundle.
Submit the request to the Web service to create the skinBundle
object.
To create a skinBundle
object using the Java client, see the Oracle Secure Enterprise Search Java API Reference.
To use a skin bundle when rendering the Search interface:
Issue an activate
operation for the skinBundle
. When you activate a default skin bundle, it can be used immediately to render the Search Application interface.
To use a skin bundle that is not the default, add a skin=
skin_name
attribute to the URL for the Search Application interface:
http://host:port/search/query/search?skin=skin_name
If the modified pages fail to open in a browser or appear with errors, read the middle-tier log file at
ORACLE_HOME/search/base_domain/servers/AdminServer/logs/AdminServer.out.
After updating the skin bundle, restart the middle tier:
ORACLE_HOME/bin/searchctl restart
This example makes a few changes to the default results page, which is shown in Figure 2-1.
Table 2-6 identifies the changes that this example makes to the default results page. You can see these differences by comparing Figure 2-1 and Figure 2-2. The title in the browser title bar is not shown.
Changes to results.ftl do not affect any other pages of the Search application, which continue to use the default skin. However, the example makes changes to inc_logo_querybox.ftl and inc_footer.ftl, which affect all of the pages that include those templates.
Table 2-6 Differences Between the Default Skin and the Example Skin
Default Skin | Example Skin | Template Rendering the Element |
---|---|---|
Oracle logo |
Example Inc. logo |
inc_logo_querybox.ftl |
Search button |
Search icon |
inc_logo_querybox.ftl |
Sidebar on left |
Sidebar on right |
results.ftl |
Title of Oracle Secure Enterprise Search |
Title of Example Inc. |
results.ftl |
No RSS feed |
RSS feed icon on the Results bar |
results.ftl |
No corporate identifier |
Example, Inc. above the copyright |
inc_footer.ftl |
The only change to the footer is the addition of Example Inc., as shown in Figure 2-3. The following pages use the same footer template, so all of them are affected by this change:
Initial splash screen: query.ftl
Results page: results.ftl
No results page: noresults.ftl
Error page: error.ftl
To make the changes to the skin shown in the previous section, the skin bundle must contain these files:
results.ftl: The template that renders the search results.
inc_logo_querybox.ftl: A template included by results.ftl to generate the logo and the query box.
inc_footer.ftl: A template included by results.ftl (and other templates) to generate the footer.
example.gif: A graphic file with the logo for a fictitious company named Example Inc.
search.jpg: a graphic file with the search icon.
rss.jpg: A graphic file with the standard RSS icon.
To create the example skin bundle directory structure:
On the Oracle SES host, create these directories:
/example/templates /example/assets/images
Copy the ftl files to the templates directory from
ORACLE_HOME/data/queryapp/support/11_1_2_0_0/templates
Copy the graphics file (created or acquired elsewhere) into the images directory.
The resulting directories have this structure:
/example /templates /inc_footer.ftl /inc_logo_querybox.ftl /results.ftl /assets /images /example.gif /rss.jpg /search.jpg
The results page contains numerous elements. Some elements appear by default, while you must define others, such as source groups and suggested links, for a specific installation. The results.ftl template uses the FreeMarker <#include> tag to include the following template files, which define distinct areas of the results page:
inc_header.ftl
inc_logo_querybox.ftl
inc_footer.ftl
This example uses the default inc_header.ftl, but alters the other templates. Figure 2-0 identifies the altered elements that are generated directly by results.ftl.
To customize results.ftl:
Open example/templates/results.ftl in a text editor.
To move the sidebar to the right, change:
<#assign sidebarPageAlign = "left">
to
<#assign sidebarPageAlign = "right">
To replace the page title, change:
<title>${msg("ORACLE_ENTERPRISE_SEARCH")} <#if req.displayQuery??> - ${req.displayQuery} </#if> </title>
to
<title>Example Inc.</title>
For the RSS feed, add the following immediately after <@ses.hit_stats/>
:
<#assign feed_img_src><@ses.skin_asset 'images/rss.jpg'/></#assign> <@ses.feed_icon title="Results Feed" img_src="${feed_img_src}"> <@ses.feed_href/> </@ses.feed_icon>
Save and close the file.
The inc_logo_querybox.ftl template renders a section of the results page immediately following the header. This section includes these elements in the default user interface:
Oracle logo
Query box
Search button
Attribute filters, both the link and the form
Browse link
Optional source group tab links above the query box, such as E-mail, Calendar, and Sales.
To customize inc_logo_querybox.ftl:
Open example/templates/inc_logo_querybox.ftl in a text editor.
To replace the Oracle logo with the Example logo, change:
<@ses.oracle_logo size="small" href="${logoHref}"/>
to
<img src="<@ses.skin_asset filename='images/example.gif'/>">
To replace the Search button with an icon, change:
<input type="submit" name="btnSearch" value="${msg("SEARCH")}">
to
<input type="image" src="<@ses.skin_asset filename="images/search.jpg" />" name="${msg("SEARCH")}" alt="${msg("SEARCH")}" style="vertical-align: bottom;">
Save and close the file.
The inc_footer.ftl template renders the links, such as Help, and the copyright information at the bottom of the page.
To customize inc_footer.ftl:
Open example/templates/inc_footer.ftl in a text editor.
For the company name, add the following immediately before <!-- Bottom Line -->
:
<div style="padding-top:10px;font-size:16px;font-weight:bold; font-style:italic;color:red;font-family:'Book Antigua',Palatino,serif; text-align:center"> Example Inc. </div>
Save and close the file.
Create a text file that identifies all of the files in the skin bundle. In this example, the file list is named /scratch/skins/example.lst. Substitute the actual path you are using for /scratch/skins.
assets/images/example.gif::/scratch/skins/example/assets/images/example.gif assets/images/search.jpg::/scratch/skins/example/assets/images/search.jpg assets/images/rss.jpg::/scratch/skins/example/assets/images/rss.jpg templates/inc_footer.ftl::/scratch/skins/example/templates/inc_footer.ftl templates/inc_logo_querybox.ftl::/scratch/skins/example/templates/inc_logo_querybox.ftl templates/results.ftl::/scratch/skins/example/templates/results.ftl
Create an XML file that describes the Example skin bundle. In this example, the XML file is named /scratch/skins/example.xml.
<?xml version="1.0" encoding="UTF-8" ?> <search:config productVersion="11.1.2.2.0" xmlns:search="http://xmlns.oracle.com/search"> <search:skinBundles> <search:skinBundle> <search:name>example</search:name> <search:isDefault>false</search:isDefault> <search:linkedVersion>11.1.2.2.0</search:linkedVersion> <search:files> <search:file path="templates/inc_footer.ftl"/> <search:file path="templates/inc_logo_querybox.ftl"/> <search:file path="templates/results.ftl"/> <search:file path="assets/images/example.gif"/> <search:file path="assets/images/search.jpg"/> <search:file path="assets/images/rss.jpg"/> </search:files> </search:skinBundle> </search:skinBundles> </search:config>
To create the Example skin bundle:
At the host command prompt, navigate to the /scratch/skins directory.
Open searchadmin
in session mode, as described in "Opening an Interactive Session".
To create the skin bundle, issue this command:
create skinBundle --NAME=example --INPUT_FILE=example.xml --ATTACHMENT_LIST=example.lst
To activate the skin bundle, issue this command:
activate skinBundle --NAME=example
Because the example skin bundle is not defined as the default, you must include the skin attribute in the URL to view the Search application.
To use the Example skin bundle:
In a browser, enter a URL like the following, substituting the appropriate host and port:
http://host:port/search/query/search?skin=example
The footer displays Example Inc., while the rest of the page uses the default skin.
Enter a search string. The results page has the changes shown in Figure 2-2, "Example Results Page".