2022 – JSON Search Index Synchronization

Another option for synchronizing JSON Search Indexes is Manual which is enabled by altering the meta-data of the index like this:

ALTER INDEX jindex
PARAMETERS ('replace metadata sync (manual)');

Now when DML occurs…

INSERT INTO jtable
VALUES('{"JTOP":3}');

SELECT *
  FROM jtable
 WHERE JSON_EXISTS(jcol,'$.JTOP');

JCOL
-------------------
{"JTOP":1}
{"JTOP":2}

It will not show up in queries (even after commits) that use the index until it is manually synched using the CTX_DDL package like this.

BEGIN
  CTX_DDL.SYNC_INDEX('JINDEX');
END;

Now the row shows up.

SELECT *
  FROM jtable
 WHERE JSON_EXISTS(jcol,'$.JTOP');

JCOL
------------------------------
{"JTOP":1}
{"JTOP":2}
{"JTOP":3}

Thanks for reading!

Leave a Comment