You can call the DescribeSearchIndex operation to query the description of a search index for a table, including fields and configurations of the search index.


  • The OTSClient instance is initialized. For more information, see Initialization.
  • A data table is created and data is written to the table.
  • A search index is created for the table. For more information, see Create search indexes.


Parameter Description
tableName The name of the table.
indexName The name of the search index.


private static DescribeSearchIndexResponse describeSearchIndex(SyncClient client) {
    DescribeSearchIndexRequest request = new DescribeSearchIndexRequest();
    request.setTableName(TABLE_NAME); request.setTableName(TABLE_NAME); // Set the name of the table.
    request.setIndexName(INDEX_NAME); // Set the name of the search index.
    DescribeSearchIndexResponse response = client.describeSearchIndex(request);
    System.out.println(response.jsonize()); // Display the details of the response.
    System.out.println(response.getSyncStat().getSyncPhase().name());// Display the synchronization status of data in the search index.
    return response;