This illustration shows that creating a ubiquitous search index mainly involves two commands. First, the DBMS_SEARCH.CREATE_INDEX
API that creates an index table named MYINDEX
. This index table contains the DATA
, METADATA
, OWNER
, SOURCE
, and KEY
columns. A MYINDEX
index is also shown as created on the DATA
column. Here, the schema owner name SCOTT
is also specified along with the index name as SCOTT.MYINDEX
.
The second command shown is the DBMS_SEARCH.ADD_SOURCE
API to add the PRODUCTS
and CUSTOMERS
table into MYINDEX
. Here too, the schema owner name is specified along with the source table name as SCOTT.PRODUCTS
and SCOTT.CUSTOMERS
.
The DATA
column is shown as an empty, and it is indicated that data from both the PRODUCTS
and CUSTOMERS
tables is being added to this index.
The METADATA
column contains entries for each row of both the source tables as:
{"OWNER":"SCOTT","SOURCE":"PRODUCTS","KEY":{"ID":1}}
{"OWNER":"SCOTT","SOURCE":"PRODUCTS","KEY":{"ID":2}}
{"OWNER":"SCOTT","SOURCE":"CUSTOMERS","KEY":{"ID":5}}
{"OWNER":"SCOTT","SOURCE":"CUSTOMERS","KEY":{"ID":9}}