CREATE_PATH_LIST

Creates a path-list preference to use with the PATHLIST parameter, when creating a path-subsetting JSON search index.

Understand Path Subsetting

You can use path subsetting to identify the fields in a document that you want to include or exclude from indexing. The excluded fields are not indexed, and the JSON search index is not used for them when querying. Filtering out irrelevant paths from documents can reduce the amount of data indexed, thereby minimizing disk space, indexing costs, and the index creation or rebuild time. As a result, the index maintenance operations improve in performance by skipping irrelevant data and saving further processing.

Consider using path subsetting if your documents include:

As an alternative to specifying the INCLUDE or EXCLUDE clauses (as explained in CREATE SEARCH INDEX for JSON search index SEARCH_ON options), you can also use the PL/SQL subprograms CTX_DDL.CREATE_PATH_LIST and CTX_DDL.ADD_PATH to specify a subset of paths to include or exclude from indexing. You can then use the CTX_DDL.ADD_PATH API to add paths to this pathlist.

Syntax

begin
  CTX_DDL.CREATE_PATH_LIST(
    pref_name  IN    VARCHAR2,
    format     IN    NUMBER,
    behavior   IN    VARCHAR2
  );
end;

pref_name

Specify the name of the pathlist preference, which is a list of paths to include or exclude from indexing.

format

Specify the type of document that this pathlist should support. Currently, the only supported value is CTX_DDL.PATHLIST_JSON.

Note: You can enable path-subsetting for JSON search indexes only if the indexed column’s data-type is JSON type.

behavior

Specify the behavior of the pathlist. The values can be:

This argument is optional. When omitted, the behavior value defaults to CTX_DDL.PATHLIST_INCLUDE.

Restrictions

Examples

Related Topics