Primary/Detail Index Example
To index the document defined in this primary/detail relationship, specify a column in the primary table using the CREATE INDEX statement.
The column you specify must be one of the allowed types.
This example uses the body column, whose function is to enable the creation of the primary/detail index and to improve readability of the code. The my_detail_pref preference is set to DETAIL_DATASTORE with the required attributes:
CREATE INDEX myindex on my_primary(body) indextype is ctxsys.context
parameters('datastore my_detail_pref');
In this example, you can also specify the title or author column to create the index. However, if you do so, changes to these columns will trigger a re-index operation.