5.12 Creating a Local Semantic Index on a Range-Partitioned Table
A local index can be created on a VARCHAR2 or CLOB column of a range-partitioned table.
To do so, use the following syntax:
CREATE INDEX <index-name> … LOCAL;
The following example creates a range-partitioned table and a local semantic index on that table:
CREATE TABLE part_newsfeed ( docid number, article CLOB, cdate DATE) partition by range (cdate) (partition p1 values less than (to_date('01-Jan-2001')), partition p2 values less than (to_date('01-Jan-2004')), partition p3 values less than (to_date('01-Jan-2008')), partition p4 values less than (to_date('01-Jan-2012')) ); CREATE INDEX ArticleLocalIndex on part_newsfeed (article) INDEXTYPE IS mdsys.SemContext PARAMETERS ('SEM_EXTR') LOCAL;
Note that every partition of the local semantic index will have content generated for the same set of policies. When you use the ALTER INDEX statement on a local index to add or drop policies associated with a semantic index partition, you should try to keep the same set of policies associated with each partition. You can achieve this result by using ALTER INDEX statements in a loop over the set of partitions. (For more information about altering semantic indexes, see Altering a Semantic Index,)
Parent topic: Semantic Indexing for Documents