16.6.4 Creating an Oracle Text Search

Create an Oracle TEXT search on table that has an Oracle TEXT index.

This topic demonstrates how create a search page on a table that has an Oracle TEXT index. In this task, you create a simple Oracle TEXT index, then a search configuration using that Oracle TEXT index, and then a search page using the Create Page Wizard.

Note:

This task assumes you have already created an application and two interactive reports built on EBA_PROJECTS and EBA_PROJECT_TASKS tables available in the sample dataset, Project Data.

16.6.4.1 Creating an Oracle Text Index

Learn how to create a simple Oracle Text index on a table.

This topic describes how to create a very simple Oracle Text index on the EBA_PROJECT_TASKS table available in the sample dataset, Project Data.

Tip:

Oracle Text provides indexing, word and theme searching, and viewing capabilities for text in query applications and document classification applications. To learn more, see Oracle Text Application Developer's Guide

To create a simple Oracle Text index on a table:

  1. On the Workspace home page, click SQL Workshop.
  2. Click SQL Commands.

    The SQL Commands home page appears.

  3. Enter the following SQL command in the command editor:
    CREATE INDEX eba_project_tasks_ctx ON eba_project_tasks(DESCRIPTION) INDEXTYPE IS CTXSYS.CONTEXT;
  4. Click Run (Ctrl+Enter) to execute the command.

    The results appear in the Results pane.

16.6.4.2 Creating an Oracle TEXT Search Configuration

Create a search configuration on existing Oracle TEXT index created on a table.

A search configuration contains information about searchable data source. This task creates a search configuration using an existing Oracle TEXT index created on the EBA_PROJECT_TASKS table.

To create an Oracle TEXT search configuration:

  1. Access the Search Configurations page:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. On the Application home page, click Shared Components.
    4. Under Navigation and Search, click Search Configurations.
      The Search Configurations page appears.
  2. On the Search Configurations page, click Create.
    The Create Search Configuration Wizard appears.
  3. Detail:
    1. Name - Enter a name for the search configuration (for example, Projects Tasks - TEXT).
    2. Search Type - Select a type of search. Options include:
      • Standard - Defines a searchable data source such as a table, SQL Query, or REST Data Source. Searches is executed by a SQL Query using LIKE expressions.
      • List - Search within a selected List from Shared Components.
      • Oracle TEXT - Define a searchable table or SQL Query which already has an Oracle TEXT index created. Search is executed by using Oracle TEXT functionality, which provides linguistic and fuzzy search capabilities.

      For this example, select Oracle TEXT.

    3. Click Next.
  4. Source:
    1. Source Type - Specify the source of the search configuration. Oracle Text search data source can be based on a Table or SQL Query.

      For this example, select Table.

    2. Table / View Owner - Select the owner of the table on which you are building a search configuration.
    3. Table / View Name - Select the table or view on which the search configuration is based. For this example, select EBA_PROJECT_TASKS.
    4. Click Next.
  5. Column Mapping:
    1. Primary Key Column - Select the primary key column for the search configuration Data Source (for example, ID).
    2. Oracle Text Index Column - Select the Oracle Index enabled column (for example, DESCRIPTION).
    3. Title Column - Select the column to be used as title (for example, NAME).
    4. Description Column - Select the column to be used as the description (for example, DESCRIPTION).
    5. Icon Source - Configure the icon that displays in the header of the search result. Options include:
      • Initials - Use the Title column to display the icon as initials.
      • CSS Classes - Use the entered CSS classes to display the icon.
      • Class Column - Use the selected column containing the icon CSS class to display the icon.

      For this example, accept the default, Initials.

  6. Click Create Search Configuration.

    The search configuration is created. The Search Configuration, Edit page appears and displays the message Search configuration created.

  7. Edit the search configuration to link to a report:
    1. Link, Link Type - Select the type of link (for example, Redirect to Page in this Application).
    2. Page - Select or enter the page to redirect to (for example, 4).
    3. Click Apply Changes.
      The Search Configurations page appears with the message Search Configuration updated.
  8. Click the Application ID breadcrumb to return to the Application home page.

16.6.4.3 Creating an Oracle TEXT Search Page

Create a Search page by running the Create Page Wizard.

Whether you are creating a Standard search or Oracle TEXT search, creating a search page by running the Create Page Wizard involves the same steps. The Create Page Wizard creates a Search field for you and prompts you to select search configurations. Note that you can also add additional search configurations later in Page Designer.

A Search page features a Search field and a Search Results region. In Page Designer, the Search Results region contains Search Sources which map to the search configurations defined in Shared Components.

To create a search page by running the Create Page Wizard:

  1. Navigate to the Application home page:
    1. On the Workspace home page, click the App Builder icon.
    2. Select the application.
  2. On the Application home page, click Create Page.
    Create a Page appears and features three tabs: Component, Feature, and Legacy Pages.
  3. Under Component, select Search Page.
  4. Page Definition:
    1. Page Number - The page number is an integer value that identifies a page within an application.
    2. Name - Specify a text name for this page (for example, Projects Tasks CTX).

      This text is also used for page Title. After page creation, you can modify the Title in Page Designer.

    3. Page Mode - Identify the page mode. Accept the default, Normal.
  5. Search Configurations - Select the search configuration to be used by this page (for example, select Projects Tasks - TEXT).
  6. Navigation - Accept the default and enable Use Breadcrumb and Use Navigation.
  7. Click Create Page.

    Page Designer appears.

    In the Rendering tab, notice the page item, PX_SEARCH (where X is the page number) and the Search Results region. PX_SEARCH is the search field which enables users to submit search terms. The Search Results region contains both the search results and the Search Source which maps to search configurations maintained in Shared Components. You can further refine and control the search display and behavior by editing attributes in the Property Editor.

  8. Run and test the page:
    1. Click Save and Run Page.
      The search page appears.
    2. In the search field, enter a search (for example, bug) and press Enter.