Skip Headers
Oracle® Fusion Applications Developer's Guide
11g Release 6 (11.1.6)

Part Number E15524-11
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

31 Deploying and Crawling Searchable Objects

This chapter describes how to deploy searchable objects to the Oracle Enterprise Crawl and Search Framework (ECSF) application.

This chapter includes the following sections:

31.1 Introduction to Deploying and Crawling Searchable Objects

The ECSF application must include the searchable objects before you deploy it to the application server.

31.2 Deploying Searchable Objects and Dependencies

Searchable objects and their dependencies must be deployed as part of the ECSF application's data model and user interface projects (Model and ViewController respectively) to make the searchable objects available for search. In order to deploy searchable objects, you must complete the following tasks:

  1. Deploy the ECSF shared library to Oracle WebLogic Server.

  2. Create an application.

  3. If desired, change the application name and context root of the view-controller project.

  4. Modify the run configuration of the view-controller project.

  5. Add the ECSF Runtime Server library and the required Java archive (JAR) files to Model and ViewController.

31.2.1 How to Deploy the ECSF Shared Library to Oracle WebLogic Server

The ECSF shared library eliminates the need for ECSF libraries to be packaged into each application. Instead, applications that depend on ECSF libraries can reference the ECSF shared library that is deployed to the Oracle WebLogic Server. The ECSF shared library contains the following Java archive (JAR) files:

  • ecsf.jar

  • search_admin_wsclient.jar

  • search_client.jar

  • ses_admin_ows_proxy.jar

  • soap.jar

The ECSF extension in JDeveloper controls the reference to the ECSF shared library that is deployed to Oracle WebLogic Server. When you add the ECSF Runtime Server or ECSF Client library to a project, the reference to the ECSF shared library, shown in Example 31-1, is automatically added to the WebLogic deployment descriptor file (weblogic-application.xml).

Example 31-1 Reference to the ECSF Shared Library

<library-ref>
   <library-name>oracle.ecsf</library-name>
</library-ref>

The ECSF shared library is oracle.ecsf.

If the weblogic-application.xml file does not exist, one is created and updated with the reference to the ECSF shared library.

In addition, when you deploy an application to a Oracle WebLogic Server instance and the project contains ECSF libraries, the code checks the descriptor for the ECSF shared library reference. If no ECSF shared library reference is detected in the descriptor, one is added. The WebLogic deployment descriptor also contains a list of library dependencies for the application to be deployed to the Oracle WebLogic Server instance.

The ECSF shared library is automatically deployed to the Integrated WebLogic Server instance by the ECSF extension in JDeveloper through the JDeveloper Application Development Runtime Service (ADRS). However, you must manually deploy the ECSF shared library to the standalone WebLogic Server.

31.2.1.1 Updating the SearchDB Data Source

The ECSF shared library is automatically deployed to the Integrated WebLogic Server instance by the ECSF extension in JDeveloper through the JDeveloper Application Development Runtime Service (ADRS). When the Integrated WebLogic Server instance is first started and the ECSF shared library is automatically deployed to it, the ECSF shared library creates a SearchDB data source in the Oracle WebLogic Server domain. The data source initially contains placeholder database connection information. You must manually update the data source after the Integrated WebLogic Server instance is started to include the correct connection information.

To update the SearchDB data source:

  1. In the Domain Structure tree of the Oracle WebLogic Server Administration Console, navigate to Services, then JDBC, then Data Sources.

  2. On the Summary of Data Sources page, click the data source name SearchDB.

  3. Click the Connection Pool tab.

  4. On the Connection Properties page, replace the default values for both the Connection URL and Properties boxes with valid connection values.

  5. Click Save.

31.2.1.2 Deploying the ECSF Shared Library to the Standalone WebLogic Server Instance

You must manually deploy the ECSF shared library to the standalone WebLogic Server instance. The ECSF shared library creates a SearchDB data source in the Oracle WebLogic Server domain. During the process of deploying the ECSF shared library, you must provide the database connection information for the SearchDB data source, which is deployed together with the shared library.

To deploy the ECSF shared library to the standalone WebLogic Server instance:

  1. Extend the Oracle WebLogic Server domain by using the Oracle Fusion Middleware Configuration Wizard (execute $WL_HOME/common/bin/config.sh).

    For more information, see Oracle Fusion Middleware Configuring Server Environments for Oracle WebLogic Server.

  2. Select the ECSF Shared Library Extension template (oracle.ecsf_11.1.1_template.jar), which is located in oracle/jdeveloper/common/templates/applications.

  3. Configure the SearchDB data source by providing valid values for the following fields:

    • DBMS Host

    • DBMS Port

    • SID

    • Username

    • User Password

    For more information, see Oracle Fusion Middleware Configuring Server Environments for Oracle WebLogic Server.

  4. When a new version of the ECSF shared library is available, you must redeploy it.

    1. Remove the old oracle.ecsf library.

      For information, see Oracle Fusion Middleware Oracle WebLogic Server Administration Console Online Help.

    2. Install the library enterprise archive (EAR) file (oracle/jdeveloper/ecsf/modules/oracle.ecsf_11.1.1/oracle.ecsf.ear) with the name set as oracle.ecsf.

      For information, see Oracle Fusion Middleware Oracle WebLogic Server Administration Console Online Help.

    Note:

    You can also redeploy the ECSF shared library by using the Oracle Fusion Middleware Configuration Wizard. For more information, see Oracle Fusion Middleware Configuring Server Environments for Oracle WebLogic Server.

31.2.2 How to Create an Application

Creating the application creates Model and ViewController, which must include the searchable objects and their dependencies.

To create a new application:

  1. From the File menu, select New.

  2. In the New Gallery dialog, select the General category and select Applications.

  3. Select the Fusion Web Application (ADF) template and click OK.

  4. In the Create Fusion Web Application (ADF) dialog, enter a name and location for the application in the Application Name and Directory fields.

  5. Enter a value in the Application Package Prefix field.

  6. Click Finish.

31.2.3 How to Change the Application Name and Context Root of the View-Controller Project

If desired, change the application name and context root of the view-controller project by modifying the Java EE application settings.

To change the Java EE Application settings:

  1. In the Application Navigator, right-click the view-controller project and select Project Properties.

  2. In the Project Properties dialog, select Java EE Application in the left panel.

  3. Change the value of the Java EE Web Application Name field to EcsfApp.

  4. Change the value of the Java EE Web Context Root field to approot.

  5. Click OK.

    The view-controller application name is set to EcsfApp, and the context root is set to approot.

31.2.4 How to Modify the Run Configuration of the View-Controller Project

Modify the run configuration of the view-controller project to run ECSF in debug mode.

To modify the run configuration:

  1. In the Application Navigator, right-click the view-controller project and select Project Properties.

  2. In the Project Properties dialog, select Run/Debug/Profile in the left panel.

  3. Select Default in the Run Configurations list, then click the Edit button.

  4. In the Edit Run Configuration dialog, select Launch Settings in the left panel.

  5. If desired, enter additional parameter values in the Java Options field. Table 31-1 lists the ECSF system parameters. Separate each parameter with a space.

    Note:

    The parameters in Table 31-1 can be set in two ways:

    • Add an entry to a file named ecsf.properties. If this file is found in the classpath by ECSF code, the property values in that file will be used. Entries in the file should be of the format:

      property=value
      
    • Set the parameters using the Java System Properties. For example, add -Dproperty=value when starting the JVM.

      If a property is found in both the ecsf.properties file and the Java System Properties, the value in the Java System Properties will be used. In other words, the Java System Properties have higher precedence.

    These parameters values can also be specified at the searchable object level. For information, see Section 28.5, "Configuring Custom Properties for Searchable Objects."

    Table 31-1 ECSF System Parameters

    Parameter Name Java Command-Line Entry Description

    oracle.ecsf.admin.dataobject.synchinterval

    -Doracle.ecsf.admin.dataobject.synchinterval=n

    Defines the interval (n), in milliseconds, for synchronizing the ECSF metadata in the cache with the ECSF metadata in the database. The default value is 30000 (30 seconds).

    oracle.ecsf.connection.name

    -Doracle.ecsf.connection.name=ConnectionName

    Specifies the name of the database connection to be used. If not specified, SearchDB is used.

    oracle.ecsf.context

    -Doracle.ecsf.context=context

    Defines the ECSF context to be used. The value can be set to oracle.ecsf.fusion.FusionSearchContextImpl for Oracle Fusion Applications; otherwise, the default ECSF context is used. The Oracle Fusion Applications search context handles Fusion specific details such as application identities.

    oracle.ecsf.crawl.batch.size

    -Doracle.ecsf.crawl.batch.size=n

    Defines the data batch size within a data feed. The value determines the number of database rows (n) that are processed per batch within a data feed. The default size is 200.

    oracle.ecsf.crawl.datafeed.size

    -Doracle.ecsf.crawl.datafeed.size=n

    Defines the size for the data feed. The value determines the number of documents (n) per data feed. The default size is 1000.

    oracle.ecsf.datasource.name

    -Doracle.ecsf.datasource.name=DataSourceName

    Specifies the Java Database Connectivity (JDBC) data source name, such as jdbc/SearchDBDS.

    oracle.ecsf.datesplitter.mode

    -Doracle.ecsf.datesplitter.mode=mode

    Defines the algorithm used to split the records in the table since the last crawled time. The value can be set to DateRowId or DateOnly. DateRowId is the default value. In DateRowId mode, it takes the records since the last crawled time and splits into evenly sized workunits using rowid ranges. In DateOnly mode, it splits into workunits based on date ranges only. This may result in workunits with too many records if there are many updated records within a short amount of time. In that case, using the DateRowId mode is recommended.

    oracle.ecsf.maxfacetdefvalues

    -Doracle.ecsf.maxfacetdefvalues=n

    Specifies the maximum number of values (n) that a facet may contain. ECSF does not return the values if a facet (for example, Country) contains a number of values (for example, USA, Canada, and so on) that exceeds the maximum. The default value is 1000.

    oracle.ecsf.max.links.depth

    -Doracle.ecsf.max.links.depth=n

    Specifies the maximum number of view object hierarchy levels to limit the depth of search.

    oracle.ecsf.service.ws.timeout

    -oracle.ecsf.service.ws.timeout=n

    Specifies the ECSF web service invocation timeout (n) in milliseconds. The default value is 90000 (90 seconds). Increasing the timeout value can resolve issues related to a slow system environment.

    oracle.ecsf.split.mode

    -Doracle.ecsf.split.mode=db

    or

    -Doracle.ecsf.split.mode=simple

    or

    -Doracle.ecsf.split.mode=

    Defines batching strategy. When the model is simple, no batching is used. Use for simple testing. The key is defined in RelationalCrawlerImpl. Its value can be db, simple, or nothing. This value defines how the crawler splits the database table. If specified with value simple, then SimpleSplitter is used. If specified with value db (default) or nothing (value is blank, or the parameter is not included at all), then RowIdSplitter is used.

    oracle.ecsf.split.threshold

    -Doracle.ecsf.split.threshold=n

    Sets the splitting algorithm threshold to the percentage you specify (n). If the percentage of records returned by the searchable object SQL query versus the total number of records in the searchable object's primary table is less than the threshold percentage, then the view object RowIdSplitter algorithm is used. Otherwise, the default RowIdSplitter algorithm is used.

    oracle.ecsf.cache.expireseconds

    -Doracle.ecsf.cache.expireseconds=n

    Defines the time (n), in seconds, for items to expire from the cache. The default value is 1800 (30 minutes).

    oracle.ecsf.cache.expireseconds.ObjectCache

    -Doracle.ecsf.cache.expireseconds.ObjectCache=n

    Defines the time (n), in seconds, for items to expire from the Searchable Objects cache.

    The default value is 24 hours.

    oracle.ecsf.cache.expireseconds.FacetDefsCache

    -Doracle.ecsf.cache.expireseconds.FacetDefsCache=n

    Defines the time (n), in seconds, for items to expire from the Facet Definitions cache.

    The default value is 24 hours.

    oracle.ecsf.cache.expireseconds.GroupCache

    -Doracle.ecsf.cache.expireseconds.GroupCache=n

    Defines the time (n), in seconds, for items to expire from the Searchable Group cache. This cache caches a Searchable Group using Engine Instance ID and Searchable Group name.

    The default is the value set by oracle.ecsf.cache.expireseconds.

    oracle.ecsf.cache.expireseconds.GroupsCache

    -Doracle.ecsf.cache.expireseconds.GroupsCache=n

    Defines the time (n), in seconds, for items to expire from the Searchable Groups cache. This cache caches Searchable Groups using Engine Instance ID.

    The default is the value set in oracle.ecsf.cache.expireseconds.

    oracle.ecsf.cache.expireseconds.EngineInstancesCache

    -Doracle.ecsf.cache.expireseconds.EngineInstancesCache=n

    Defines the time (n), in seconds, for items to expire from the Search Engine Instances cache.

    The default is the value set in oracle.ecsf.cache.expireseconds.


  6. Click OK.

    The run configuration is set to debug mode, and other ECSF system parameters are set.

31.2.5 How to Add the ECSF Runtime Server Library and Required Java Archive Files to the Model and View-Controller Projects

You must add the ECSF Runtime Server library and one of the following sets of required Java archive (JAR) files to both the Model and view-controller projects:

  • For using ECSF for crawling and querying

    • oracle/jdeveloper/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar

    • oracle/wlserver_10.3/server/lib/wls-api.jar

  • For using ECSF for querying only

    • oracle/jdeveloper/webservices/lib/soap.jar

Caution:

Make sure that cwallet.sso and jazn-data.xml are part of your application before adding the Java archive (JAR) files. You can do so through the Application Navigator by navigating to Application Resources, then Descriptors, then META-INF. The cwallet.sso file is created when you create a database connection. To create jazn-data.xml, right-click the META-INF folder select New Oracle Deployment Descriptor, select jazn-data.xml, and click Finish.

You do not need to add the Java archive (JAR) files that are included in a library that you have already added.

31.2.6 How to Deploy the ECSF Application

After you update the Model and view-controller projects to include the searchable objects and dependencies, you must deploy the ECSF application. For information, see Chapter 3, "Setting Up Your JDeveloper Application Workspace and Projects."

31.3 Crawling Searchable Objects

Make sure that the Oracle Secure Enterprise Search (Oracle SES) engine successfully crawls the searchable objects in the Oracle Fusion applications and indexes them as documents.

31.3.1 How to Verify the Crawl

Use the Oracle Enterprise Manager Fusion Applications Control and Oracle SES administration user interface to verify the crawl.

Note:

The feed servlet must be running for Oracle SES to successfully crawl the data.

To verify the crawl:

  1. Deploy the index schedule.

    For information, see the "Deploy the Index Schedules" task in Oracle Fusion Applications Administrator's Guide.

  2. Start the index schedule.

    For information, see the "Start the Index Schedules" task in Oracle Fusion Applications Administrator's Guide.

  3. Use the Oracle SES administration user interface to inspect whether the crawls were successful and verify how much data is crawled.

    For information, see the Oracle Secure Enterprise Search Administrator's Guide.