CREATE FULL TEXT INDEX

To create a text index on that table that indexes the category and txt columns, use CREATE FULLTEXT INDEX statement:

CREATE FULLTEXT INDEX [if not exists] <index-name> ON <table-name>
(<field-name> [ <mapping-spec> ], ...)
[ES_SHARDS = <n>] [ES_REPLICAS = <n>]

For example:

kv-> execute 'CREATE FULLTEXT INDEX JokeIndex
ON Joke (category, txt)'
Statement completed successfully

While creating index, CREATE FULLTEXT INDEX statement uses the OVERRIDE flag, which allows to delete any index existing in Elasticsearch by the same name as would be created by the command.

CREATE FULLTEXT INDEX [IF NOT EXISTS] index_name ON table_name
   (field_name [{mapping_spec}] [, field_name [{mapping_spec}]]...)
   [ES_SHARDS = value] [ES_REPLICAS = value] 
   [OVERRIDE] [COMMENT comment]

For example:

CREATE INDEX JokeIndex on  Joke (category, txt) OVERRIDE

For more information, see the following in the Oracle NoSQL Database Full Text Search guide: