This topic describes the problem description, cause, and solution of the "operation is denied as table TTL exists" exception when you create a search index.
The following error occurs when you create a search index:
ErrorCode: OTSParameterInvalid, ErrorMessage: operation is denied as table TTL exists.
The time to live (TTL) of a table is set to a value other than -1(The data never expires). You can create a search index only when the TTL of a table is set to -1.
Set the TTL of a table to -1 by using the console or SDKs.
- Use the console
Log on to the Tablestore console. Go to the Details tab. Click Modify Attributes. In the dialog box, set the TTL to -1, and click OK.
- Use SDKs
Call the UpdateTable operation to set the TTL of a table to -1 based on corresponding SDKs.