Skip Headers
Oracle® Fusion Applications Developer's Guide
11g Release 5 (11.1.5)

Part Number E15524-10
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

29 Validating and Testing Search Metadata

This chapter describes how to validate and test search metadata.

This chapter includes the following sections:

29.1 Introduction to Validating and Testing Search Metadata

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.

29.2 Validating the Search Metadata

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:

29.2.1 How to Validate Search Metadata

Use the Search navigation tab of the overview editor in JDeveloper, shown in Figure 27-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:

  1. In the overview editor, select the Search navigation tab.

  2. Click the Validate button.

    If validation errors occur, the Search Validation Results dialog, shown in Figure 29-1, appears.

    Figure 29-1 Search Validations Dialog

    Search Validations dialog

    The dialog shows a list of validation errors.

  3. Click OK when you finish viewing the errors.

29.3 Testing Searchable Objects Through a Web Browser

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:

  1. Set the following Java option in the Run configuration dialog in order to test the searchable objects through a web browser: -Doracle.ecsf.crawl.mode.debug=true. For more information, see Section 30.2.4, "How to Modify the Run Configuration of the View-Controller Project."

  2. Set up ECSF security. For information, see Chapter 28, "Configuring ECSF Security."

  3. Create searchable objects. For information, see Chapter 27, "Creating Searchable Objects."

  4. Run the ECSF feed servlet. For information, see Section 29.3.1, "How to Run the ECSF Feed Servlet."

29.3.1 How to Run the ECSF Feed Servlet

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 29-1 when the ECSF Runtime Server library is added to the project.

Example 29-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>

Run the ECSF feed servlet to make sure it runs properly.

To run the ECSF feed servlet:

  1. Set the Application Navigator to display the Java archive (JAR) files and libraries by clicking the Navigator Display Options button in the Projects panel and selecting Show Libraries, as shown in Figure 29-2.

    Figure 29-2 Navigator Display Options

    Navigator Display Options menu
  2. In the Application Navigator, expand the ECSF Runtime Server library.

  3. Expand the oracle.ecsf.feed package.

  4. Right-click the SearchFeedServlet.class file and select Run to start the Integrated WebLogic Server instance. A browser opens to the following feed URL:

    http://localhost:7101/approot/searchfeedservlet/%2A

    Note:

    The web page is an RSS feed. Depending on the browser you use, you may not be able to view the contents of the web page. If you cannot view the RSS feed, navigate to View > Source in the browser to view the feed.

    You can click the Terminate (red square) button to stop the ECSF feed servlet.

29.3.2 How to Test the Config Feed

To test the Config Feed, run the ECSF feed servlet with a modified URL.

To test the Config Feed:

  1. Change the feed URL http://localhost:7101/approot/searchfeedservlet/%2A by:

    • Replacing localhost with the server name of the IP address.

    • Replacing %2A with the fully qualified name of the view object, including the package path.

    • Appending /ConfigFeed to the end of the URL.

    For example, if JDeveloper is running on the Linux server wlsserver.com, and the fully qualified package path of EmpVO is oracle.ecsf.EmpVO (case-sensitive), the resulting Config Feed URL would be http://wlsserver.com:8988/approot/searchfeedservlet/oracle.ecsf.EmpVO/ConfigFeed.

  2. Refresh the web page.

    The resulting RSS feed, the Config Feed, should resemble the feed in Example 29-2.

    Example 29-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>
    

    If the RSS feed does not appear, then either the runtime server is not set up properly or the path to the view object is incorrect. The URL is case-sensitive.

    If no attribute exists for the <securityAttribute> tag, you must mark at least one searchable attribute as a Secure Attribute. For information, see Section 27.2.3, "How to Make View Objects Searchable."

  3. After adding the metadata, make sure to restart the Integrated WebLogic Server instance.

29.3.3 How to Test the Control Feed

To test the Control Feed, run the ECSF feed servlet with a modified URL.

To test the Control Feed:

  1. Locate the URL provided in the <feedLocation> tag of the Config Feed. For information, see Section 29.3.2, "How to Test the Config Feed."

    In the Config Feed shown in Example 29-2, the URL is http://localhost:8988/approot/searchfeedservlet/runtime.EmpView/ControlFeed.

  2. Change the feed URL by replacing localhost with the server name of the IP address.

    For example, if JDeveloper is running on the Linux server example.com, the resulting Control Feed URL would be http://example.com:8988/approot/searchfeedservlet/runtime.EmpView/ControlFeed.

  3. Refresh the web page.

  4. At the login screen, enter the username and password.

    The resulting RSS feed, the Control Feed, should resemble the feed in Example 29-3.

    Example 29-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>
    

29.3.4 How to Test the Data Feed

To test the Data Feed, run the ECSF feed servlet with a modified URL.

To test the Data Feed:

  1. Locate the URL provided in the <link> tag under the <item> tag of the Control Feed. For information, see Section 29.3.3, "How to Test the Control Feed."

    In the Control Feed shown in Example 29-3, the URL is http://example.com:8988/approot/searchfeedservlet/runtime.EmpView/DataFeed?tableName=Emp&workUnitStart=AAHz%2BdADeAAA07UAAA&workUnitEnd=AAHz%2BdADeAAA07UAAV&type=ROWID.

  2. Refresh the web page with the URL.

  3. At the login screen, enter the username and password.

    The resulting RSS feed, the Data Feed, should resemble the feed in Example 29-4.

    Example 29-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>
    

29.3.5 How to Reset the State of the Feeds

Resetting the feed for the searchable object recrawls the object. Reset the state of the feeds by modifying the Config Feed URL.

To reset the state of the feeds:

  1. Recall the Config Feed URL of the searchable object. For information, see Section 29.3.2, "How to Test the Config Feed."

  2. Append ?forceInitialCrawl=true to the Config Feed URL, for example, http://example.com:8988/approot/searchfeedservlet/runtime.EmpView/ConfigFeed?forceInitialCrawl=true

  3. Paste the resulting URL in your browser and refresh the web page.