How to invoke DBMS_JSON.get_index_dataguide against a table in different schema
Say I'm connected to the database as user MYSELF.
Then I create a table in a different schema JSON_SCHEMA to store some JSON documents, and insert some JSON documents respectively.
Next, I create a SEARCH INDEX on the JSON column (jsondoc) in this table, and gather index statistics (both successful):
CREATE SEARCH INDEX JSON_SCHEMA.T1_IDX on JSON_SCHEMA.TABLE_NAME (jsondoc) FOR JSON;
exec dbms.stats.gather_index_stats('JSON_SCHEMA', 'T1_IDX', estimate_percent=>99);
Per documentation, DATAGUIDE parameter is ON by default when creating search index. I tried to specify it explicitly, but it made no difference.