This chapter includes the following sections:
Search metadata is dependent on view object metadata, which is used in such areas as title, body expression, and searchable attributes. However, changes made to the view object metadata are not automatically reflected in the search metadata. To identify those changes, you must validate the search metadata by using the Validate button in the Search page of the Oracle JDeveloper overview editor for Oracle Enterprise Crawl and Search Framework (ECSF).
Testing the searchable objects ensures that they can be registered in the Oracle Fusion Applications database without issues.
To make sure that you are creating correct and valid search metadata on view object metadata, you must validate the metadata before applying changes. When you run validation on the search metadata, ECSF checks for the following:
Table and alias of the primary table exists in the view object.
Title, body, and keywords expressions are valid.
Search extension is valid.
Search attributes are valid, and all the search attributes exist in the view object.
Search actions are valid:
Search action names are unique.
Default action exists. Warning is displayed when it does not exist.
Title expression is valid.
Search facets are valid:
Facet name is unique.
Use the Search navigation tab of the overview editor in JDeveloper, shown in Figure 29-3, to validate search metadata. If you identify any errors (changes to the view object metadata that are not reflected in the search metadata), you must manually fix them.
To validate search metadata through the Validate button, do the following:
Before you register searchable objects in the Oracle Fusion Applications database, you should test the searchable objects by testing the Config Feed, Control Feed, and Data Feed.
ECSF prohibits multiple feeds per searchable object, so after achieving the desired results for the Config Feed, Control Feed, and Data Feed, you must reset the state of the feeds.
Before you begin testing searchable objects, do the following:
-Doracle.ecsf.crawl.mode.debug=true
. For more information, see How to Modify the Run Configuration of the View-Controller Project.Running the ECSF feed servlet in debug mode provides the servlet access to HTTP GET
, the method that allows you to input URLs with arguments directly into the browser.
The web.xml
file is automatically updated with the ECSF feed servlet, feed servlet mapping, and filter mappings as shown in Example 31-1 when the ECSF Runtime Server library is added to the project.
To ensure that the ECSF feed servlet runs properly, do the following:
Example 31-1 ECSF Feed Servlet, Feed Servlet Mapping, and Filter Mappings
<servlet> <servlet-name>SearchFeedServlet</servlet-name> <servlet-class>oracle.ecsf.feed.SearchFeedServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>SearchFeedServlet</servlet-name> <url-pattern>/searchfeedservlet/*</url-pattern> </servlet-mapping> <filter-mapping> <filter-name>JpsFilter</filter-name> <servlet-name>SearchFeedServlet</servlet-name> <dispatcher>FORWARD</dispatcher> <dispatcher>REQUEST</dispatcher> <dispatcher>INCLUDE</dispatcher> </filter-mapping> <filter-mapping> <filter-name>ServletADFFilter</filter-name> <servlet-name>SearchFeedServlet</servlet-name> <dispatcher>FORWARD</dispatcher> <dispatcher>REQUEST</dispatcher> </filter-mapping>
To test the Config Feed, run the ECSF feed servlet with a modified URL.
Example 31-2 Sample Results of the Config Feed
- <rsscrawler xmlns="http://xmlns.example.com/search/rsscrawlerconfig"> <feedLocation>http://localhost:8988/approot/searchfeedservlet/runtime.EmpView/ControlFeed</feedLocation> <feedType>controlFeed</feedType> <errorFeedLocation>/tmp</errorFeedLocation> <securityType>attributeBased</securityType> <securityAttribute name="DEPTNO" grant="true" /> </rsscrawler>
To test the Control Feed, run the ECSF feed servlet with a modified URL.
Example 31-3 Sample Results of the Control Feed
<?xml version="1.0" encoding="UTF-8" ?> - <rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0"> - <channel> <title>Control feed for ECSF</title> <link>http://example.com:8988/approot/searchfeedservlet/runtime.EmpView/ControlFeed</link> <description>Control feed for Enterprise Crawl and Search Framework</description> <lastBuildDate>2008-04-06T19:20:08.159Z</lastBuildDate> - <channelDesc xmlns="http://xmlns.example.com/orarss"> <feedType>control</feedType> </channelDesc> - <item> - <link> - <![CDATA[ http://example.com:8988/approot/searchfeedservlet/runtime.EmpView/DataFeed?tableName=Emp&workUnitStart=AAHz%2BdADeAAA07UAAA&workUnitEnd=AAHz%2BdADeAAA07UAAV&type=ROWID ]]> </link> </item> </channel> </rss>
To test the Data Feed, run the ECSF feed servlet with a modified URL.
Example 31-4 Sample Results of the Data Feed
<?xml version="1.0" encoding="UTF-8" ?> - <rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0"> - <channel> <title>RSS for Oracle Applications Search</title> <link>http://example.com:8988/approot/searchfeedservlet/runtime.EmpView/DataFeed</link> <description>RSS for Oracle Applications Search</description> <lastBuildDate>2008-04-06T19:36:08.950Z</lastBuildDate> - <channelDesc xmlns="http://xmlns.example.com/orarss"> <feedType>incremental</feedType> </channelDesc> - <item> - <link> - <![CDATA[ http://ecsf.example.com/search/runtime.EmpView?EMPNO=7839 ]]> </link> - <title> - <![CDATA[ KING: 5000 ]]> </title> - <itemDesc xmlns="http://xmlns.example.com/orarss"> - <documentMetadata> - <accessURL> - <![CDATA[ http://example.com/EmpNo=7839 ]]> </accessURL> - <keywords> - <![CDATA[ Employee department job salary data KING ]]> </keywords> - <summary> - <![CDATA[ KING 1981-11-17T00:00:00.000Z ]]> </summary> <language>en</language> - <docAttr name="ENAME"> - <![CDATA[ KING ]]> </docAttr> - <docAttr name="CITY_ID"> - <![CDATA[ 2 ]]> </docAttr> - <docAttr name="STATE_ID"> - <![CDATA[ 1 ]]> </docAttr> </documentMetadata> - <documentAcl> <securityAttr name="DEPTNO">NO_SECURITY</securityAttr> </documentAcl> - <documentInfo> <status>STATUS_OK_FOR_INDEX</status> </documentInfo> - <documentContent> - <content type="text/plain"> - <![CDATA[ Identification Number: 10.7839 ]]> </content> - <contentLink type="text/html"> - <![CDATA[ http://example.com:8988/approot/searchfeedservlet/runtime.EmpView/Attachment?schemaName=null&tableName=runtime.EmpView&columnName=Attachment&keyCount=1&keyName0=EMPNO&keyValue0=7839 ]]> </contentLink> </documentContent> </itemDesc> </item>
Resetting the feed for the searchable object recrawls the object. Reset the state of the feeds by modifying the Config Feed URL.
?forceInitialCrawl=true
to the Config Feed URL, for example, http://example.com:8988/approot/searchfeedservlet/runtime.EmpView/ConfigFeed?forceInitialCrawl=true