Friday, May 4, 2012

Implementing WebCenter live search adapter


Here are the steps involved in  making WebCenter live search adapter work in a WebCenter portal application. My requirement was to make WebCenter portal pages searchable without using Oracle SES.

In order to make WebCenter pages searchable, we need tagging service enabled on WebCenter portal. 

All steps mentioned below, should be performed at development time from JDeveloper.

Step 1:

Run wl_schema.sql script to create tables needed for tagging service.
As mentioned on Oracle website,  
To install the WebCenter schema:
1.     From the Tools menu, select SQL Worksheet.
2.     In the Select Connection dialog, click the pencil icon to edit the connection.
3.     Modify the connection to use an administrator username and password, such as SYS (using the SYSDBA role) then click OK.
4.     Click OK to close the Select Connection dialog.
5.     From the Tools menu, choose SQL Worksheet.
6.     Enter the following SQL statement in the SQL Worksheet panel:
7.   
8.  @@JDEV_HOME/jdeveloper/jdev/extensions/oracle.webcenter.install/sql/oracle/wc_schema.sql
where JDEV_HOME is the location where JDeveloper is installed on your machine.
9.     Click the Execute Statement icon, or press F9, to run the script.
10.  At the prompt, enter webcenter as the name for the schema and a password for the schema, such as welcome1. The name of the schema must bewebcenter.
11.  If prompted for the Default Tablespace and Temporary Tablespaces, re-enter the default values users and temp, then accept them.


Step 2:
 Add ADF 'tag button' from component palette to all pages that need to be searchable.

Step 3:
Add ADF 'tag dialog task flow' from component palette to pages with tag buttons and to under the same region.

Step 4:
Add 'search' or 'search toolbar' ADF taskflow to a search page.

Step 5:
Comment out the section

<!--crawl-properties fullCrawlInterval="P5D" enableWcServicesCrawl="true"
                      enableWcDiscussionsCrawl="true" enableWcUcmCrawl="true"/-->

in adf-config.xml


This is how my search.jspx page looked after adding search taskflow, tag button component and  tag dialog taskflow. 


          <f:facet name="content">
            <pe:pageCustomizable id="hm_pgc1">
              <cust:panelCustomizable id="hm_pnc1" layout="scroll">
                <af:region value="#{bindings.searchview1.regionModel}" id="r1"/>
                <tag:taggingButton resourceId="#{facesContext.viewRoot.viewId}"
                                   resourceName="#{facesContext.viewRoot.viewId}"
                                   serviceId="oracle.webcenter.page" id="tb1"/>
                <af:region value="#{bindings.tagginglaunchdialog1.regionModel}"
                           id="r3"/>
              </cust:panelCustomizable>
              <f:facet name="editor">
                <pe:pageEditorPanel id="pep1"/>
              </f:facet>
            </pe:pageCustomizable>
          </f:facet>




Step 6:
Run the app, go to page and add tags delimited by space.


Step 7:
Search should bring back pages urls when searched for tags.


No comments:

Post a Comment