Previous Next JavaScript must be enabled to correctly display this content

## 16.9.6 Creating a Ubiquitous Search

Search across multiple objects within an entire schema by creating a ubiquitous database search.

Note:

Searching using an Oracle ubiquitous search index requires Oracle AI Database 26ai or later. Also, the index must be located in the parsing schema of the application.

This topic demonstrates how to create a search page on multiple tables that have a ubiquitous search index. In this topic, you create a simple ubiquitous search index, a search configuration using that ubiquitous search index, and then a search page using the Create Page Wizard.

- Creating a Ubiquitous Search Index
  Learn how to create a ubiquitous search index on multiple tables.
- Creating a Ubiquitous Search Configuration
  Create a search configuration on an existing ubiquitous search index.
- Creating a Ubiquitous Search Page
  Create a Search page by running the Create Page Wizard.

Parent topic: Adding Search to an Application

### 16.9.6.1 Creating a Ubiquitous Search Index

Learn how to create a ubiquitous search index on multiple tables.

Note:

Searching using an Oracle ubiquitous search index requires Oracle AI Database 26ai or later. Also, the index must be located in the parsing schema of the application.

Starting with Oracle AI Database 26ai, you can use the `DBMS_SEARCH PL/SQL` package for indexing of multiple schema objects in a single index. To learn more, see Performing Ubiquitous Search with DBMS_SEARCH APIs in Oracle Text Application Developer's Guide.

A ubiquitous search index (or `DBMS_SEARCH` index) is a JSON search index with predefined set of preferences and settings enabled for performing full text search on multiple columns, tables, or views. You use the `DBMS_SEARCH PL/SQL` package to create, manage, and query these indexes.

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

To create a ubiquitous search index:

1. Click SQL Commands.

   The SQL Commands home page appears.

2. Enter the following SQL command in the command editor:

       BEGIN
           DBMS_SEARCH.CREATE_INDEX( 'MY_SEARCH_INDEX' );
           DBMS_SEARCH.ADD_SOURCE ( 'MY_SEARCH_INDEX', 'EBA_PROJECT_TASKS' );
       END;
       /

3. Click Run (Ctrl+Enter) to execute the command.

   The results appear in the Results pane.

Parent topic: Creating a Ubiquitous Search

### 16.9.6.2 Creating a Ubiquitous Search Configuration

Create a search configuration on an existing ubiquitous search index.

A search configuration contains information about searchable data source. This task creates a search configuration using an existing ubiquitous search index created on the `EBA_PROJECT_TASKS` tables.

Note:

This task assumes you have already created an application and an interactive report built on the `EBA_PROJECT_TASKS` table available in the sample dataset, Project Data.

To create a ubiquitous 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.
   1. Name - Enter a name for the search configuration (for example, `Projects Tasks - Ubiquitous`).
   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.

      - 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.

      - Oracle Ubiquitous Search - Search using an Oracle ubiquitous search index (requires Oracle AI Database 26ai or later). The index must be located in the parsing schema of the application.

      - List - Search within a selected List from Shared Components.

      For this example, select Oracle Ubiquitous Search and click Next.

3. Source:
   1. Search Index Name - Select an Oracle ubiquitous search index, this index must already exist in your parsing schema.

      For this example, select MY_SEARCH_INDEX.

   2. Search Source Name - Choose an Oracle Ubiquitous Search index source from your parsing schema which is part of your selected Oracle Ubiquitous Search index. For this example, select `EBA_PROJECT_TASKS`.
   3. Click Next.
4. Column Mapping:
   1. Primary Key Column - Select the primary key column for the Search Configuration Data Source (for example, ID).
   2. Description Column - Select the column to be used as description.
   3. Oracle Ubiquitous Index Column - Select the Oracle Ubiquitous enabled column (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.

5. Click Create Search Configuration.

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

6. 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, 2).
   3. Click Apply Changes.
      The Search Configurations page appears with the message `Search Configuration updated`.
7. Click the Application ID breadcrumb to return to the Application home page.

Parent topic: Creating a Ubiquitous Search

### 16.9.6.3 Creating a Ubiquitous Search Page

Create a Search page by running the Create Page Wizard.

Whether you are creating a Standard search or Oracle Ubiquitous 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. Click Create Page.

   Create a Page appears.

3. Click Component and 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, `Search Projects - Ubiquitous`).

      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 - Ubiquitous).
   Description of the illustration ubiquitous_create_seach_page.png
6. Navigation - Accept the default and enable Use Breadcrumb.
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.

   The search results appear.

   Description of the illustration ubiquitous_run_page.png

Parent topic: Creating a Ubiquitous Search