9.5 Managing Faceted Search

A faceted search page features a faceted search region on the left side of the page and report on the right side of the page.

You can create a faceted search page with either the Create Application Wizard or Create Page Wizard.

9.5.1 Example Faceted Search

View an example faceted search page.

A faceted search page features a faceted search region and report. The faceted search region displays on the left side of the page and enables users to narrow down the search result by selecting facet values. Narrowing the search result, makes it easier for users to find the data they want. The right side of the results region is a classic report which displays in report or card view. Both the Create Application Wizard and Create Page Wizard support the creation of faceted search pages.

The following is an example of a faceted search page built on the SAMPLE$PROJECTS table.

Description of faceted_search.png follows
Description of the illustration faceted_search.png

9.5.2 Creating Faceted Search Using the Create Application Wizard

Run the Create Application Wizard to create a new application that contains a faceted search page.

To create an application that faceted search page:

  1. On the Workspace home page, click the App Builder icon.
  2. Click the Create button.
  3. Click New Application.
  4. For Name, enter the name used to identify the application to developers.
  5. For Appearance, accept the default Theme Style and menu layout (Vita, Side Menu), or change it by clicking the Set Appearance icon adjacent to the Appearance field.
  6. Click Add Page and select Faceted Search.
  7. In the Add Faceted Search Page dialog:
    1. Page Name - Enter a name for this page.
    2. Set Icon - Select an icon to display in the navigation menu for this page.
    3. Select a report type: Report or Cards.
    4. Table - Select a table or view.

      The behavior differs depending upon your selection:

      • Table - If you select a Table, facets are auto discovered using APEX Data Dictionary Cache.

      • View - If you select a View, facets are not auto-discovered. Developers can create the facet report page based on a View, but the only Search field included are searchable VARCHAR2 columns.

    5. What appears next depends upon whether you selected Report or Cards.
      • Report - Select Include Form to include a form page for creating or updating records.
      • Cards - Select the information to display on each card: Card Title, Description Column, and Additional Text Column.
    6. Advanced - Expand Advanced to configure these options:
      • Set as Home Page - Enable this to make this page the home page for the application.

      • Set as Administration Page - Enable this to have this page display under Administration.

      • Page Help - Enter text to be displayed when the user selects Page Help.

    7. Click Add Page.
  8. Features - Select features to include with the application. Features provide application-level functionality and can only be added once per application. To learn more, click the Help icon adjacent to Features.
  9. Settings - Specify settings used to generate this application. To learn more about an attribute, click the Help icon adjacent to Settings.
  10. Click Create Application.

9.5.3 Creating Faceted Search Using the Create Page Wizard

Run the Create Page Wizard to add a new faceted search page to an existing application.

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

  1. On the Workspace home page, click the App Builder icon.
  2. Select the application.
  3. Click Create Page.
  4. For Create a Page:
    1. Page Type - Select Component and then Report.

      Tip:

      Component pages provides page-level functionality and can be added multiple times within a given application such as reports, forms, charts, or calendars. Feature pages provide application-level functionality and can only be added once per application.

    2. Select Faceted Search.
  5. On Page Attributes:
    1. Page Number - If you enter a new page number, the wizard creates a new page. If you enter an existing page number, the wizard adds the component to that page.
    2. Page Name - Specify a name for the page.
    3. Breadcrumb - Select whether you want to use a breadcrumb navigation control on your page. If you elect to include breadcrumb navigation, additional attributes appear.
    4. Click Next.
  6. For Navigation Preference:
    1. elect how you want this page integrated into the Navigation Menu. To learn more, see field-level Help.
    2. Click Next.
  7. For Data Source, select a Data Source for the page:
    • Local Database - Data is sourced from the local database.
    • REST Enabled SQL Service - Data is sourced from a remote database, where the connection is defined using REST Enabled SQL. To create or maintain REST Enabled SQL references, navigate to Shared Components, REST Enabled SQL.
    • Web Source - Data is sourced from a RESTful web service defined using Web Source Modules. To create or maintain Web Source Modules, navigate to Shared Components, Web Source Modules.

    Tip:

    The steps that follow differ depending upon the selected Data Source. This task assumes the Data Source is a Local Database.

  8. For Source Type, specify the source of the new page:
    • Table:
      • Table / View Owner - Select the owner of the table on which you are building the faceted search page.

      • Table/View Name - Select the table or view on which the page will be based.

      • Display As - Select the classic report view: Report or Cards.

      • Select the facets to include in the report. Facets display as search fields in runtime.

        Facet recommendations are based on statistics of data in your table. Click Refresh to refresh the column statistics to provide better recommendations.

    • SQL Query:
      • Enter a SQL SELECT statement - Enter the SQL query. To see an example, expand the SQL Query Example region.
  9. Click Create.

Tip:

To learn more about external data sources, see "Managing REST Enabled SQL References" and "Managing Web Source Modules."

9.5.4 Editing a Faceted Search

Review the components that comprise a faceted search page by viewing attributes in Page Designer.

A faceted search page features a faceted region that enables users to narrow down the search results and displays the results in either a report or cards view.

Note:

The SQL query for a cards page includes special aliases such as CARD_MODIFIERS and CARD_LINK. To link a card to a new page, you must update CARD_LINK in the underlying SQL query to point to the appropriate target. To see an example, see "Linking Project Cards to Maintain Project Form" in Oracle Application Express Tutorial: Building an Application.

To review the components of a faceted search page:

  1. View the page in Page Designer:
    1. On the Workspace home page, click the App Builder icon.
    2. Select an application.
    3. Select a page.
    Page Designer appears.
  2. Review the Search region. In the Rendering tab under Left Column, locate and select the Search region.
    Description of faceted_search_facets.png follows
    Description of the illustration faceted_search_facets.png

    Note the Search region type is Faceted Search. The search fields display under Facets. Facets are similar to items but feature the following unique characteristics:

    • Naming Conventions - Facets use the same naming convention as items. By default, wizards prefix facet names with P<page no>_<item name> (for example, P5_SEARCH).

    • Filtering on More Than One Column - Search facet type can filter based on more than one column and, when not external, is always at the top of the facets region.

    • Associated with a Column - Facets are associated with a column from the report region.

    • Differences with Checkbox or Select List Facets - The facet types such as Checkbox or Select List specify the UI for selecting or entering the facet values. They are not implemented the same as page items even if they have the same type name. For this reason, most dynamic actions do not apply to facets.

  3. Review the report region. In the Rendering tab, locate and select the report region (for example, Project Tasks).
    Description of faceted_report_region.png follows
    Description of the illustration faceted_report_region.png

    In previous example, note that the attributes indicate the report Type is a Classic Report built on the SAMPLE$PROJECT_TASKS table in a local database: