1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ots
  5. SearchIndex
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ots.SearchIndex

Explore with Pulumi AI

Provides an OTS search index resource.

For information about OTS search index and how to use it, see Search index overview.

NOTE: Available since v1.187.0.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";

const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const _default = new random.index.Integer("default", {
    min: 10000,
    max: 99999,
});
const defaultInstance = new alicloud.ots.Instance("default", {
    name: `${name}-${_default.result}`,
    description: name,
    accessedBy: "Any",
    tags: {
        Created: "TF",
        For: "example",
    },
});
const defaultTable = new alicloud.ots.Table("default", {
    instanceName: defaultInstance.name,
    tableName: "tf_example",
    timeToLive: -1,
    maxVersion: 1,
    enableSse: true,
    sseKeyType: "SSE_KMS_SERVICE",
    primaryKeys: [
        {
            name: "pk1",
            type: "Integer",
        },
        {
            name: "pk2",
            type: "String",
        },
        {
            name: "pk3",
            type: "Binary",
        },
    ],
});
const defaultSearchIndex = new alicloud.ots.SearchIndex("default", {
    instanceName: defaultInstance.name,
    tableName: defaultTable.tableName,
    indexName: "example_index",
    timeToLive: -1,
    schemas: [{
        fieldSchemas: [
            {
                fieldName: "col1",
                fieldType: "Text",
                isArray: false,
                index: true,
                analyzer: "Split",
                store: true,
            },
            {
                fieldName: "col2",
                fieldType: "Long",
                enableSortAndAgg: true,
            },
            {
                fieldName: "pk1",
                fieldType: "Long",
            },
            {
                fieldName: "pk2",
                fieldType: "Text",
            },
        ],
        indexSettings: [{
            routingFields: [
                "pk1",
                "pk2",
            ],
        }],
        indexSorts: [{
            sorters: [
                {
                    sorterType: "PrimaryKeySort",
                    order: "Asc",
                },
                {
                    sorterType: "FieldSort",
                    order: "Desc",
                    fieldName: "col2",
                    mode: "Max",
                },
            ],
        }],
    }],
});
Copy
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "tf-example"
default = random.index.Integer("default",
    min=10000,
    max=99999)
default_instance = alicloud.ots.Instance("default",
    name=f"{name}-{default['result']}",
    description=name,
    accessed_by="Any",
    tags={
        "Created": "TF",
        "For": "example",
    })
default_table = alicloud.ots.Table("default",
    instance_name=default_instance.name,
    table_name="tf_example",
    time_to_live=-1,
    max_version=1,
    enable_sse=True,
    sse_key_type="SSE_KMS_SERVICE",
    primary_keys=[
        {
            "name": "pk1",
            "type": "Integer",
        },
        {
            "name": "pk2",
            "type": "String",
        },
        {
            "name": "pk3",
            "type": "Binary",
        },
    ])
default_search_index = alicloud.ots.SearchIndex("default",
    instance_name=default_instance.name,
    table_name=default_table.table_name,
    index_name="example_index",
    time_to_live=-1,
    schemas=[{
        "field_schemas": [
            {
                "field_name": "col1",
                "field_type": "Text",
                "is_array": False,
                "index": True,
                "analyzer": "Split",
                "store": True,
            },
            {
                "field_name": "col2",
                "field_type": "Long",
                "enable_sort_and_agg": True,
            },
            {
                "field_name": "pk1",
                "field_type": "Long",
            },
            {
                "field_name": "pk2",
                "field_type": "Text",
            },
        ],
        "index_settings": [{
            "routing_fields": [
                "pk1",
                "pk2",
            ],
        }],
        "index_sorts": [{
            "sorters": [
                {
                    "sorter_type": "PrimaryKeySort",
                    "order": "Asc",
                },
                {
                    "sorter_type": "FieldSort",
                    "order": "Desc",
                    "field_name": "col2",
                    "mode": "Max",
                },
            ],
        }],
    }])
Copy
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ots"
	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "tf-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
			Min: 10000,
			Max: 99999,
		})
		if err != nil {
			return err
		}
		defaultInstance, err := ots.NewInstance(ctx, "default", &ots.InstanceArgs{
			Name:        pulumi.Sprintf("%v-%v", name, _default.Result),
			Description: pulumi.String(name),
			AccessedBy:  pulumi.String("Any"),
			Tags: pulumi.StringMap{
				"Created": pulumi.String("TF"),
				"For":     pulumi.String("example"),
			},
		})
		if err != nil {
			return err
		}
		defaultTable, err := ots.NewTable(ctx, "default", &ots.TableArgs{
			InstanceName: defaultInstance.Name,
			TableName:    pulumi.String("tf_example"),
			TimeToLive:   pulumi.Int(-1),
			MaxVersion:   pulumi.Int(1),
			EnableSse:    pulumi.Bool(true),
			SseKeyType:   pulumi.String("SSE_KMS_SERVICE"),
			PrimaryKeys: ots.TablePrimaryKeyArray{
				&ots.TablePrimaryKeyArgs{
					Name: pulumi.String("pk1"),
					Type: pulumi.String("Integer"),
				},
				&ots.TablePrimaryKeyArgs{
					Name: pulumi.String("pk2"),
					Type: pulumi.String("String"),
				},
				&ots.TablePrimaryKeyArgs{
					Name: pulumi.String("pk3"),
					Type: pulumi.String("Binary"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = ots.NewSearchIndex(ctx, "default", &ots.SearchIndexArgs{
			InstanceName: defaultInstance.Name,
			TableName:    defaultTable.TableName,
			IndexName:    pulumi.String("example_index"),
			TimeToLive:   pulumi.Int(-1),
			Schemas: ots.SearchIndexSchemaArray{
				&ots.SearchIndexSchemaArgs{
					FieldSchemas: ots.SearchIndexSchemaFieldSchemaArray{
						&ots.SearchIndexSchemaFieldSchemaArgs{
							FieldName: pulumi.String("col1"),
							FieldType: pulumi.String("Text"),
							IsArray:   pulumi.Bool(false),
							Index:     pulumi.Bool(true),
							Analyzer:  pulumi.String("Split"),
							Store:     pulumi.Bool(true),
						},
						&ots.SearchIndexSchemaFieldSchemaArgs{
							FieldName:        pulumi.String("col2"),
							FieldType:        pulumi.String("Long"),
							EnableSortAndAgg: pulumi.Bool(true),
						},
						&ots.SearchIndexSchemaFieldSchemaArgs{
							FieldName: pulumi.String("pk1"),
							FieldType: pulumi.String("Long"),
						},
						&ots.SearchIndexSchemaFieldSchemaArgs{
							FieldName: pulumi.String("pk2"),
							FieldType: pulumi.String("Text"),
						},
					},
					IndexSettings: ots.SearchIndexSchemaIndexSettingArray{
						&ots.SearchIndexSchemaIndexSettingArgs{
							RoutingFields: pulumi.StringArray{
								pulumi.String("pk1"),
								pulumi.String("pk2"),
							},
						},
					},
					IndexSorts: ots.SearchIndexSchemaIndexSortArray{
						&ots.SearchIndexSchemaIndexSortArgs{
							Sorters: ots.SearchIndexSchemaIndexSortSorterArray{
								&ots.SearchIndexSchemaIndexSortSorterArgs{
									SorterType: pulumi.String("PrimaryKeySort"),
									Order:      pulumi.String("Asc"),
								},
								&ots.SearchIndexSchemaIndexSortSorterArgs{
									SorterType: pulumi.String("FieldSort"),
									Order:      pulumi.String("Desc"),
									FieldName:  pulumi.String("col2"),
									Mode:       pulumi.String("Max"),
								},
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "tf-example";
    var @default = new Random.Index.Integer("default", new()
    {
        Min = 10000,
        Max = 99999,
    });

    var defaultInstance = new AliCloud.Ots.Instance("default", new()
    {
        Name = $"{name}-{@default.Result}",
        Description = name,
        AccessedBy = "Any",
        Tags = 
        {
            { "Created", "TF" },
            { "For", "example" },
        },
    });

    var defaultTable = new AliCloud.Ots.Table("default", new()
    {
        InstanceName = defaultInstance.Name,
        TableName = "tf_example",
        TimeToLive = -1,
        MaxVersion = 1,
        EnableSse = true,
        SseKeyType = "SSE_KMS_SERVICE",
        PrimaryKeys = new[]
        {
            new AliCloud.Ots.Inputs.TablePrimaryKeyArgs
            {
                Name = "pk1",
                Type = "Integer",
            },
            new AliCloud.Ots.Inputs.TablePrimaryKeyArgs
            {
                Name = "pk2",
                Type = "String",
            },
            new AliCloud.Ots.Inputs.TablePrimaryKeyArgs
            {
                Name = "pk3",
                Type = "Binary",
            },
        },
    });

    var defaultSearchIndex = new AliCloud.Ots.SearchIndex("default", new()
    {
        InstanceName = defaultInstance.Name,
        TableName = defaultTable.TableName,
        IndexName = "example_index",
        TimeToLive = -1,
        Schemas = new[]
        {
            new AliCloud.Ots.Inputs.SearchIndexSchemaArgs
            {
                FieldSchemas = new[]
                {
                    new AliCloud.Ots.Inputs.SearchIndexSchemaFieldSchemaArgs
                    {
                        FieldName = "col1",
                        FieldType = "Text",
                        IsArray = false,
                        Index = true,
                        Analyzer = "Split",
                        Store = true,
                    },
                    new AliCloud.Ots.Inputs.SearchIndexSchemaFieldSchemaArgs
                    {
                        FieldName = "col2",
                        FieldType = "Long",
                        EnableSortAndAgg = true,
                    },
                    new AliCloud.Ots.Inputs.SearchIndexSchemaFieldSchemaArgs
                    {
                        FieldName = "pk1",
                        FieldType = "Long",
                    },
                    new AliCloud.Ots.Inputs.SearchIndexSchemaFieldSchemaArgs
                    {
                        FieldName = "pk2",
                        FieldType = "Text",
                    },
                },
                IndexSettings = new[]
                {
                    new AliCloud.Ots.Inputs.SearchIndexSchemaIndexSettingArgs
                    {
                        RoutingFields = new[]
                        {
                            "pk1",
                            "pk2",
                        },
                    },
                },
                IndexSorts = new[]
                {
                    new AliCloud.Ots.Inputs.SearchIndexSchemaIndexSortArgs
                    {
                        Sorters = new[]
                        {
                            new AliCloud.Ots.Inputs.SearchIndexSchemaIndexSortSorterArgs
                            {
                                SorterType = "PrimaryKeySort",
                                Order = "Asc",
                            },
                            new AliCloud.Ots.Inputs.SearchIndexSchemaIndexSortSorterArgs
                            {
                                SorterType = "FieldSort",
                                Order = "Desc",
                                FieldName = "col2",
                                Mode = "Max",
                            },
                        },
                    },
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.ots.Instance;
import com.pulumi.alicloud.ots.InstanceArgs;
import com.pulumi.alicloud.ots.Table;
import com.pulumi.alicloud.ots.TableArgs;
import com.pulumi.alicloud.ots.inputs.TablePrimaryKeyArgs;
import com.pulumi.alicloud.ots.SearchIndex;
import com.pulumi.alicloud.ots.SearchIndexArgs;
import com.pulumi.alicloud.ots.inputs.SearchIndexSchemaArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var name = config.get("name").orElse("tf-example");
        var default_ = new Integer("default", IntegerArgs.builder()
            .min(10000)
            .max(99999)
            .build());

        var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
            .name(String.format("%s-%s", name,default_.result()))
            .description(name)
            .accessedBy("Any")
            .tags(Map.ofEntries(
                Map.entry("Created", "TF"),
                Map.entry("For", "example")
            ))
            .build());

        var defaultTable = new Table("defaultTable", TableArgs.builder()
            .instanceName(defaultInstance.name())
            .tableName("tf_example")
            .timeToLive(-1)
            .maxVersion(1)
            .enableSse(true)
            .sseKeyType("SSE_KMS_SERVICE")
            .primaryKeys(            
                TablePrimaryKeyArgs.builder()
                    .name("pk1")
                    .type("Integer")
                    .build(),
                TablePrimaryKeyArgs.builder()
                    .name("pk2")
                    .type("String")
                    .build(),
                TablePrimaryKeyArgs.builder()
                    .name("pk3")
                    .type("Binary")
                    .build())
            .build());

        var defaultSearchIndex = new SearchIndex("defaultSearchIndex", SearchIndexArgs.builder()
            .instanceName(defaultInstance.name())
            .tableName(defaultTable.tableName())
            .indexName("example_index")
            .timeToLive(-1)
            .schemas(SearchIndexSchemaArgs.builder()
                .fieldSchemas(                
                    SearchIndexSchemaFieldSchemaArgs.builder()
                        .fieldName("col1")
                        .fieldType("Text")
                        .isArray(false)
                        .index(true)
                        .analyzer("Split")
                        .store(true)
                        .build(),
                    SearchIndexSchemaFieldSchemaArgs.builder()
                        .fieldName("col2")
                        .fieldType("Long")
                        .enableSortAndAgg(true)
                        .build(),
                    SearchIndexSchemaFieldSchemaArgs.builder()
                        .fieldName("pk1")
                        .fieldType("Long")
                        .build(),
                    SearchIndexSchemaFieldSchemaArgs.builder()
                        .fieldName("pk2")
                        .fieldType("Text")
                        .build())
                .indexSettings(SearchIndexSchemaIndexSettingArgs.builder()
                    .routingFields(                    
                        "pk1",
                        "pk2")
                    .build())
                .indexSorts(SearchIndexSchemaIndexSortArgs.builder()
                    .sorters(                    
                        SearchIndexSchemaIndexSortSorterArgs.builder()
                            .sorterType("PrimaryKeySort")
                            .order("Asc")
                            .build(),
                        SearchIndexSchemaIndexSortSorterArgs.builder()
                            .sorterType("FieldSort")
                            .order("Desc")
                            .fieldName("col2")
                            .mode("Max")
                            .build())
                    .build())
                .build())
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: tf-example
resources:
  default:
    type: random:integer
    properties:
      min: 10000
      max: 99999
  defaultInstance:
    type: alicloud:ots:Instance
    name: default
    properties:
      name: ${name}-${default.result}
      description: ${name}
      accessedBy: Any
      tags:
        Created: TF
        For: example
  defaultTable:
    type: alicloud:ots:Table
    name: default
    properties:
      instanceName: ${defaultInstance.name}
      tableName: tf_example
      timeToLive: -1
      maxVersion: 1
      enableSse: true
      sseKeyType: SSE_KMS_SERVICE
      primaryKeys:
        - name: pk1
          type: Integer
        - name: pk2
          type: String
        - name: pk3
          type: Binary
  defaultSearchIndex:
    type: alicloud:ots:SearchIndex
    name: default
    properties:
      instanceName: ${defaultInstance.name}
      tableName: ${defaultTable.tableName}
      indexName: example_index
      timeToLive: -1
      schemas:
        - fieldSchemas:
            - fieldName: col1
              fieldType: Text
              isArray: false
              index: true
              analyzer: Split
              store: true
            - fieldName: col2
              fieldType: Long
              enableSortAndAgg: true
            - fieldName: pk1
              fieldType: Long
            - fieldName: pk2
              fieldType: Text
          indexSettings:
            - routingFields:
                - pk1
                - pk2
          indexSorts:
            - sorters:
                - sorterType: PrimaryKeySort
                  order: Asc
                - sorterType: FieldSort
                  order: Desc
                  fieldName: col2
                  mode: Max
Copy

Create SearchIndex Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new SearchIndex(name: string, args: SearchIndexArgs, opts?: CustomResourceOptions);
@overload
def SearchIndex(resource_name: str,
                args: SearchIndexArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def SearchIndex(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                index_name: Optional[str] = None,
                instance_name: Optional[str] = None,
                schemas: Optional[Sequence[SearchIndexSchemaArgs]] = None,
                table_name: Optional[str] = None,
                time_to_live: Optional[int] = None)
func NewSearchIndex(ctx *Context, name string, args SearchIndexArgs, opts ...ResourceOption) (*SearchIndex, error)
public SearchIndex(string name, SearchIndexArgs args, CustomResourceOptions? opts = null)
public SearchIndex(String name, SearchIndexArgs args)
public SearchIndex(String name, SearchIndexArgs args, CustomResourceOptions options)
type: alicloud:ots:SearchIndex
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SearchIndexArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SearchIndexArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SearchIndexArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SearchIndexArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SearchIndexArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var searchIndexResource = new AliCloud.Ots.SearchIndex("searchIndexResource", new()
{
    IndexName = "string",
    InstanceName = "string",
    Schemas = new[]
    {
        new AliCloud.Ots.Inputs.SearchIndexSchemaArgs
        {
            FieldSchemas = new[]
            {
                new AliCloud.Ots.Inputs.SearchIndexSchemaFieldSchemaArgs
                {
                    FieldName = "string",
                    FieldType = "string",
                    Analyzer = "string",
                    EnableSortAndAgg = false,
                    Index = false,
                    IsArray = false,
                    Store = false,
                },
            },
            IndexSettings = new[]
            {
                new AliCloud.Ots.Inputs.SearchIndexSchemaIndexSettingArgs
                {
                    RoutingFields = new[]
                    {
                        "string",
                    },
                },
            },
            IndexSorts = new[]
            {
                new AliCloud.Ots.Inputs.SearchIndexSchemaIndexSortArgs
                {
                    Sorters = new[]
                    {
                        new AliCloud.Ots.Inputs.SearchIndexSchemaIndexSortSorterArgs
                        {
                            FieldName = "string",
                            Mode = "string",
                            Order = "string",
                            SorterType = "string",
                        },
                    },
                },
            },
        },
    },
    TableName = "string",
    TimeToLive = 0,
});
Copy
example, err := ots.NewSearchIndex(ctx, "searchIndexResource", &ots.SearchIndexArgs{
	IndexName:    pulumi.String("string"),
	InstanceName: pulumi.String("string"),
	Schemas: ots.SearchIndexSchemaArray{
		&ots.SearchIndexSchemaArgs{
			FieldSchemas: ots.SearchIndexSchemaFieldSchemaArray{
				&ots.SearchIndexSchemaFieldSchemaArgs{
					FieldName:        pulumi.String("string"),
					FieldType:        pulumi.String("string"),
					Analyzer:         pulumi.String("string"),
					EnableSortAndAgg: pulumi.Bool(false),
					Index:            pulumi.Bool(false),
					IsArray:          pulumi.Bool(false),
					Store:            pulumi.Bool(false),
				},
			},
			IndexSettings: ots.SearchIndexSchemaIndexSettingArray{
				&ots.SearchIndexSchemaIndexSettingArgs{
					RoutingFields: pulumi.StringArray{
						pulumi.String("string"),
					},
				},
			},
			IndexSorts: ots.SearchIndexSchemaIndexSortArray{
				&ots.SearchIndexSchemaIndexSortArgs{
					Sorters: ots.SearchIndexSchemaIndexSortSorterArray{
						&ots.SearchIndexSchemaIndexSortSorterArgs{
							FieldName:  pulumi.String("string"),
							Mode:       pulumi.String("string"),
							Order:      pulumi.String("string"),
							SorterType: pulumi.String("string"),
						},
					},
				},
			},
		},
	},
	TableName:  pulumi.String("string"),
	TimeToLive: pulumi.Int(0),
})
Copy
var searchIndexResource = new SearchIndex("searchIndexResource", SearchIndexArgs.builder()
    .indexName("string")
    .instanceName("string")
    .schemas(SearchIndexSchemaArgs.builder()
        .fieldSchemas(SearchIndexSchemaFieldSchemaArgs.builder()
            .fieldName("string")
            .fieldType("string")
            .analyzer("string")
            .enableSortAndAgg(false)
            .index(false)
            .isArray(false)
            .store(false)
            .build())
        .indexSettings(SearchIndexSchemaIndexSettingArgs.builder()
            .routingFields("string")
            .build())
        .indexSorts(SearchIndexSchemaIndexSortArgs.builder()
            .sorters(SearchIndexSchemaIndexSortSorterArgs.builder()
                .fieldName("string")
                .mode("string")
                .order("string")
                .sorterType("string")
                .build())
            .build())
        .build())
    .tableName("string")
    .timeToLive(0)
    .build());
Copy
search_index_resource = alicloud.ots.SearchIndex("searchIndexResource",
    index_name="string",
    instance_name="string",
    schemas=[{
        "field_schemas": [{
            "field_name": "string",
            "field_type": "string",
            "analyzer": "string",
            "enable_sort_and_agg": False,
            "index": False,
            "is_array": False,
            "store": False,
        }],
        "index_settings": [{
            "routing_fields": ["string"],
        }],
        "index_sorts": [{
            "sorters": [{
                "field_name": "string",
                "mode": "string",
                "order": "string",
                "sorter_type": "string",
            }],
        }],
    }],
    table_name="string",
    time_to_live=0)
Copy
const searchIndexResource = new alicloud.ots.SearchIndex("searchIndexResource", {
    indexName: "string",
    instanceName: "string",
    schemas: [{
        fieldSchemas: [{
            fieldName: "string",
            fieldType: "string",
            analyzer: "string",
            enableSortAndAgg: false,
            index: false,
            isArray: false,
            store: false,
        }],
        indexSettings: [{
            routingFields: ["string"],
        }],
        indexSorts: [{
            sorters: [{
                fieldName: "string",
                mode: "string",
                order: "string",
                sorterType: "string",
            }],
        }],
    }],
    tableName: "string",
    timeToLive: 0,
});
Copy
type: alicloud:ots:SearchIndex
properties:
    indexName: string
    instanceName: string
    schemas:
        - fieldSchemas:
            - analyzer: string
              enableSortAndAgg: false
              fieldName: string
              fieldType: string
              index: false
              isArray: false
              store: false
          indexSettings:
            - routingFields:
                - string
          indexSorts:
            - sorters:
                - fieldName: string
                  mode: string
                  order: string
                  sorterType: string
    tableName: string
    timeToLive: 0
Copy

SearchIndex Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The SearchIndex resource accepts the following input properties:

IndexName
This property is required.
Changes to this property will trigger replacement.
string
The index name of the OTS Table. If changed, a new index would be created.
InstanceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the OTS instance in which table will located.
Schemas
This property is required.
Changes to this property will trigger replacement.
List<Pulumi.AliCloud.Ots.Inputs.SearchIndexSchema>
The schema of the search index. If changed, a new index would be created. See schema below.
TableName
This property is required.
Changes to this property will trigger replacement.
string
The name of the OTS table. If changed, a new table would be created.
TimeToLive Changes to this property will trigger replacement. int
The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1. If the retention period exceeds the TTL value, OTS automatically deletes expired data.
IndexName
This property is required.
Changes to this property will trigger replacement.
string
The index name of the OTS Table. If changed, a new index would be created.
InstanceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the OTS instance in which table will located.
Schemas
This property is required.
Changes to this property will trigger replacement.
[]SearchIndexSchemaArgs
The schema of the search index. If changed, a new index would be created. See schema below.
TableName
This property is required.
Changes to this property will trigger replacement.
string
The name of the OTS table. If changed, a new table would be created.
TimeToLive Changes to this property will trigger replacement. int
The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1. If the retention period exceeds the TTL value, OTS automatically deletes expired data.
indexName
This property is required.
Changes to this property will trigger replacement.
String
The index name of the OTS Table. If changed, a new index would be created.
instanceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the OTS instance in which table will located.
schemas
This property is required.
Changes to this property will trigger replacement.
List<SearchIndexSchema>
The schema of the search index. If changed, a new index would be created. See schema below.
tableName
This property is required.
Changes to this property will trigger replacement.
String
The name of the OTS table. If changed, a new table would be created.
timeToLive Changes to this property will trigger replacement. Integer
The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1. If the retention period exceeds the TTL value, OTS automatically deletes expired data.
indexName
This property is required.
Changes to this property will trigger replacement.
string
The index name of the OTS Table. If changed, a new index would be created.
instanceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the OTS instance in which table will located.
schemas
This property is required.
Changes to this property will trigger replacement.
SearchIndexSchema[]
The schema of the search index. If changed, a new index would be created. See schema below.
tableName
This property is required.
Changes to this property will trigger replacement.
string
The name of the OTS table. If changed, a new table would be created.
timeToLive Changes to this property will trigger replacement. number
The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1. If the retention period exceeds the TTL value, OTS automatically deletes expired data.
index_name
This property is required.
Changes to this property will trigger replacement.
str
The index name of the OTS Table. If changed, a new index would be created.
instance_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the OTS instance in which table will located.
schemas
This property is required.
Changes to this property will trigger replacement.
Sequence[SearchIndexSchemaArgs]
The schema of the search index. If changed, a new index would be created. See schema below.
table_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the OTS table. If changed, a new table would be created.
time_to_live Changes to this property will trigger replacement. int
The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1. If the retention period exceeds the TTL value, OTS automatically deletes expired data.
indexName
This property is required.
Changes to this property will trigger replacement.
String
The index name of the OTS Table. If changed, a new index would be created.
instanceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the OTS instance in which table will located.
schemas
This property is required.
Changes to this property will trigger replacement.
List<Property Map>
The schema of the search index. If changed, a new index would be created. See schema below.
tableName
This property is required.
Changes to this property will trigger replacement.
String
The name of the OTS table. If changed, a new table would be created.
timeToLive Changes to this property will trigger replacement. Number
The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1. If the retention period exceeds the TTL value, OTS automatically deletes expired data.

Outputs

All input properties are implicitly available as output properties. Additionally, the SearchIndex resource produces the following output properties:

CreateTime int
The search index create time.
CurrentSyncTimestamp int
The timestamp for sync phase.
Id string
The provider-assigned unique ID for this managed resource.
IndexId string
The index id of the search index which could not be changed.
SyncPhase string
The search index sync phase. possible values: Full, Incr.
CreateTime int
The search index create time.
CurrentSyncTimestamp int
The timestamp for sync phase.
Id string
The provider-assigned unique ID for this managed resource.
IndexId string
The index id of the search index which could not be changed.
SyncPhase string
The search index sync phase. possible values: Full, Incr.
createTime Integer
The search index create time.
currentSyncTimestamp Integer
The timestamp for sync phase.
id String
The provider-assigned unique ID for this managed resource.
indexId String
The index id of the search index which could not be changed.
syncPhase String
The search index sync phase. possible values: Full, Incr.
createTime number
The search index create time.
currentSyncTimestamp number
The timestamp for sync phase.
id string
The provider-assigned unique ID for this managed resource.
indexId string
The index id of the search index which could not be changed.
syncPhase string
The search index sync phase. possible values: Full, Incr.
create_time int
The search index create time.
current_sync_timestamp int
The timestamp for sync phase.
id str
The provider-assigned unique ID for this managed resource.
index_id str
The index id of the search index which could not be changed.
sync_phase str
The search index sync phase. possible values: Full, Incr.
createTime Number
The search index create time.
currentSyncTimestamp Number
The timestamp for sync phase.
id String
The provider-assigned unique ID for this managed resource.
indexId String
The index id of the search index which could not be changed.
syncPhase String
The search index sync phase. possible values: Full, Incr.

Look up Existing SearchIndex Resource

Get an existing SearchIndex resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: SearchIndexState, opts?: CustomResourceOptions): SearchIndex
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        create_time: Optional[int] = None,
        current_sync_timestamp: Optional[int] = None,
        index_id: Optional[str] = None,
        index_name: Optional[str] = None,
        instance_name: Optional[str] = None,
        schemas: Optional[Sequence[SearchIndexSchemaArgs]] = None,
        sync_phase: Optional[str] = None,
        table_name: Optional[str] = None,
        time_to_live: Optional[int] = None) -> SearchIndex
func GetSearchIndex(ctx *Context, name string, id IDInput, state *SearchIndexState, opts ...ResourceOption) (*SearchIndex, error)
public static SearchIndex Get(string name, Input<string> id, SearchIndexState? state, CustomResourceOptions? opts = null)
public static SearchIndex get(String name, Output<String> id, SearchIndexState state, CustomResourceOptions options)
resources:  _:    type: alicloud:ots:SearchIndex    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CreateTime int
The search index create time.
CurrentSyncTimestamp int
The timestamp for sync phase.
IndexId string
The index id of the search index which could not be changed.
IndexName Changes to this property will trigger replacement. string
The index name of the OTS Table. If changed, a new index would be created.
InstanceName Changes to this property will trigger replacement. string
The name of the OTS instance in which table will located.
Schemas Changes to this property will trigger replacement. List<Pulumi.AliCloud.Ots.Inputs.SearchIndexSchema>
The schema of the search index. If changed, a new index would be created. See schema below.
SyncPhase string
The search index sync phase. possible values: Full, Incr.
TableName Changes to this property will trigger replacement. string
The name of the OTS table. If changed, a new table would be created.
TimeToLive Changes to this property will trigger replacement. int
The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1. If the retention period exceeds the TTL value, OTS automatically deletes expired data.
CreateTime int
The search index create time.
CurrentSyncTimestamp int
The timestamp for sync phase.
IndexId string
The index id of the search index which could not be changed.
IndexName Changes to this property will trigger replacement. string
The index name of the OTS Table. If changed, a new index would be created.
InstanceName Changes to this property will trigger replacement. string
The name of the OTS instance in which table will located.
Schemas Changes to this property will trigger replacement. []SearchIndexSchemaArgs
The schema of the search index. If changed, a new index would be created. See schema below.
SyncPhase string
The search index sync phase. possible values: Full, Incr.
TableName Changes to this property will trigger replacement. string
The name of the OTS table. If changed, a new table would be created.
TimeToLive Changes to this property will trigger replacement. int
The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1. If the retention period exceeds the TTL value, OTS automatically deletes expired data.
createTime Integer
The search index create time.
currentSyncTimestamp Integer
The timestamp for sync phase.
indexId String
The index id of the search index which could not be changed.
indexName Changes to this property will trigger replacement. String
The index name of the OTS Table. If changed, a new index would be created.
instanceName Changes to this property will trigger replacement. String
The name of the OTS instance in which table will located.
schemas Changes to this property will trigger replacement. List<SearchIndexSchema>
The schema of the search index. If changed, a new index would be created. See schema below.
syncPhase String
The search index sync phase. possible values: Full, Incr.
tableName Changes to this property will trigger replacement. String
The name of the OTS table. If changed, a new table would be created.
timeToLive Changes to this property will trigger replacement. Integer
The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1. If the retention period exceeds the TTL value, OTS automatically deletes expired data.
createTime number
The search index create time.
currentSyncTimestamp number
The timestamp for sync phase.
indexId string
The index id of the search index which could not be changed.
indexName Changes to this property will trigger replacement. string
The index name of the OTS Table. If changed, a new index would be created.
instanceName Changes to this property will trigger replacement. string
The name of the OTS instance in which table will located.
schemas Changes to this property will trigger replacement. SearchIndexSchema[]
The schema of the search index. If changed, a new index would be created. See schema below.
syncPhase string
The search index sync phase. possible values: Full, Incr.
tableName Changes to this property will trigger replacement. string
The name of the OTS table. If changed, a new table would be created.
timeToLive Changes to this property will trigger replacement. number
The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1. If the retention period exceeds the TTL value, OTS automatically deletes expired data.
create_time int
The search index create time.
current_sync_timestamp int
The timestamp for sync phase.
index_id str
The index id of the search index which could not be changed.
index_name Changes to this property will trigger replacement. str
The index name of the OTS Table. If changed, a new index would be created.
instance_name Changes to this property will trigger replacement. str
The name of the OTS instance in which table will located.
schemas Changes to this property will trigger replacement. Sequence[SearchIndexSchemaArgs]
The schema of the search index. If changed, a new index would be created. See schema below.
sync_phase str
The search index sync phase. possible values: Full, Incr.
table_name Changes to this property will trigger replacement. str
The name of the OTS table. If changed, a new table would be created.
time_to_live Changes to this property will trigger replacement. int
The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1. If the retention period exceeds the TTL value, OTS automatically deletes expired data.
createTime Number
The search index create time.
currentSyncTimestamp Number
The timestamp for sync phase.
indexId String
The index id of the search index which could not be changed.
indexName Changes to this property will trigger replacement. String
The index name of the OTS Table. If changed, a new index would be created.
instanceName Changes to this property will trigger replacement. String
The name of the OTS instance in which table will located.
schemas Changes to this property will trigger replacement. List<Property Map>
The schema of the search index. If changed, a new index would be created. See schema below.
syncPhase String
The search index sync phase. possible values: Full, Incr.
tableName Changes to this property will trigger replacement. String
The name of the OTS table. If changed, a new table would be created.
timeToLive Changes to this property will trigger replacement. Number
The index type of the OTS Table. Specifies the retention period of data in the search index. Unit: seconds. Default value: -1. If the retention period exceeds the TTL value, OTS automatically deletes expired data.

Supporting Types

SearchIndexSchema
, SearchIndexSchemaArgs

FieldSchemas
This property is required.
Changes to this property will trigger replacement.
List<Pulumi.AliCloud.Ots.Inputs.SearchIndexSchemaFieldSchema>
A list of field schemas. See field_schema below.
IndexSettings Changes to this property will trigger replacement. List<Pulumi.AliCloud.Ots.Inputs.SearchIndexSchemaIndexSetting>
The settings of the search index, including routingFields. See index_setting below.
IndexSorts Changes to this property will trigger replacement. List<Pulumi.AliCloud.Ots.Inputs.SearchIndexSchemaIndexSort>
The presorting settings of the search index, including sorters. If no value is specified for the indexSort parameter, field values are sorted by primary key by default. See index_sort below.
FieldSchemas
This property is required.
Changes to this property will trigger replacement.
[]SearchIndexSchemaFieldSchema
A list of field schemas. See field_schema below.
IndexSettings Changes to this property will trigger replacement. []SearchIndexSchemaIndexSetting
The settings of the search index, including routingFields. See index_setting below.
IndexSorts Changes to this property will trigger replacement. []SearchIndexSchemaIndexSort
The presorting settings of the search index, including sorters. If no value is specified for the indexSort parameter, field values are sorted by primary key by default. See index_sort below.
fieldSchemas
This property is required.
Changes to this property will trigger replacement.
List<SearchIndexSchemaFieldSchema>
A list of field schemas. See field_schema below.
indexSettings Changes to this property will trigger replacement. List<SearchIndexSchemaIndexSetting>
The settings of the search index, including routingFields. See index_setting below.
indexSorts Changes to this property will trigger replacement. List<SearchIndexSchemaIndexSort>
The presorting settings of the search index, including sorters. If no value is specified for the indexSort parameter, field values are sorted by primary key by default. See index_sort below.
fieldSchemas
This property is required.
Changes to this property will trigger replacement.
SearchIndexSchemaFieldSchema[]
A list of field schemas. See field_schema below.
indexSettings Changes to this property will trigger replacement. SearchIndexSchemaIndexSetting[]
The settings of the search index, including routingFields. See index_setting below.
indexSorts Changes to this property will trigger replacement. SearchIndexSchemaIndexSort[]
The presorting settings of the search index, including sorters. If no value is specified for the indexSort parameter, field values are sorted by primary key by default. See index_sort below.
field_schemas
This property is required.
Changes to this property will trigger replacement.
Sequence[SearchIndexSchemaFieldSchema]
A list of field schemas. See field_schema below.
index_settings Changes to this property will trigger replacement. Sequence[SearchIndexSchemaIndexSetting]
The settings of the search index, including routingFields. See index_setting below.
index_sorts Changes to this property will trigger replacement. Sequence[SearchIndexSchemaIndexSort]
The presorting settings of the search index, including sorters. If no value is specified for the indexSort parameter, field values are sorted by primary key by default. See index_sort below.
fieldSchemas
This property is required.
Changes to this property will trigger replacement.
List<Property Map>
A list of field schemas. See field_schema below.
indexSettings Changes to this property will trigger replacement. List<Property Map>
The settings of the search index, including routingFields. See index_setting below.
indexSorts Changes to this property will trigger replacement. List<Property Map>
The presorting settings of the search index, including sorters. If no value is specified for the indexSort parameter, field values are sorted by primary key by default. See index_sort below.

SearchIndexSchemaFieldSchema
, SearchIndexSchemaFieldSchemaArgs

FieldName
This property is required.
Changes to this property will trigger replacement.
string
The name of the field that is used to sort data. only required if sorter_type is FieldSort.
FieldType
This property is required.
Changes to this property will trigger replacement.
string
Specifies the type of the field. Valid values: Text, Long, Double, Boolean, Keyword, Date, GeoPoint, Nested.
Analyzer Changes to this property will trigger replacement. string
Specifies the type of the analyzer that you want to use. If fieldType is set to Text, you can configure this parameter. Otherwise, the default analyzer type single-word tokenization is used.
EnableSortAndAgg Changes to this property will trigger replacement. bool
Specifies whether to enable sorting and aggregation. Type: Boolean. Sorting can be enabled only for fields for which enable_sort_and_agg is set to true.
Index Changes to this property will trigger replacement. bool
Specifies whether to enable indexing for the column. Type: Boolean.
IsArray Changes to this property will trigger replacement. bool
Specifies whether the value is an array. Type: Boolean.
Store Changes to this property will trigger replacement. bool
Specifies whether to store the value of the field in the search index. Type: Boolean. If you set store to true, you can read the value of the field from the search index without querying the data table. This improves query performance.
FieldName
This property is required.
Changes to this property will trigger replacement.
string
The name of the field that is used to sort data. only required if sorter_type is FieldSort.
FieldType
This property is required.
Changes to this property will trigger replacement.
string
Specifies the type of the field. Valid values: Text, Long, Double, Boolean, Keyword, Date, GeoPoint, Nested.
Analyzer Changes to this property will trigger replacement. string
Specifies the type of the analyzer that you want to use. If fieldType is set to Text, you can configure this parameter. Otherwise, the default analyzer type single-word tokenization is used.
EnableSortAndAgg Changes to this property will trigger replacement. bool
Specifies whether to enable sorting and aggregation. Type: Boolean. Sorting can be enabled only for fields for which enable_sort_and_agg is set to true.
Index Changes to this property will trigger replacement. bool
Specifies whether to enable indexing for the column. Type: Boolean.
IsArray Changes to this property will trigger replacement. bool
Specifies whether the value is an array. Type: Boolean.
Store Changes to this property will trigger replacement. bool
Specifies whether to store the value of the field in the search index. Type: Boolean. If you set store to true, you can read the value of the field from the search index without querying the data table. This improves query performance.
fieldName
This property is required.
Changes to this property will trigger replacement.
String
The name of the field that is used to sort data. only required if sorter_type is FieldSort.
fieldType
This property is required.
Changes to this property will trigger replacement.
String
Specifies the type of the field. Valid values: Text, Long, Double, Boolean, Keyword, Date, GeoPoint, Nested.
analyzer Changes to this property will trigger replacement. String
Specifies the type of the analyzer that you want to use. If fieldType is set to Text, you can configure this parameter. Otherwise, the default analyzer type single-word tokenization is used.
enableSortAndAgg Changes to this property will trigger replacement. Boolean
Specifies whether to enable sorting and aggregation. Type: Boolean. Sorting can be enabled only for fields for which enable_sort_and_agg is set to true.
index Changes to this property will trigger replacement. Boolean
Specifies whether to enable indexing for the column. Type: Boolean.
isArray Changes to this property will trigger replacement. Boolean
Specifies whether the value is an array. Type: Boolean.
store Changes to this property will trigger replacement. Boolean
Specifies whether to store the value of the field in the search index. Type: Boolean. If you set store to true, you can read the value of the field from the search index without querying the data table. This improves query performance.
fieldName
This property is required.
Changes to this property will trigger replacement.
string
The name of the field that is used to sort data. only required if sorter_type is FieldSort.
fieldType
This property is required.
Changes to this property will trigger replacement.
string
Specifies the type of the field. Valid values: Text, Long, Double, Boolean, Keyword, Date, GeoPoint, Nested.
analyzer Changes to this property will trigger replacement. string
Specifies the type of the analyzer that you want to use. If fieldType is set to Text, you can configure this parameter. Otherwise, the default analyzer type single-word tokenization is used.
enableSortAndAgg Changes to this property will trigger replacement. boolean
Specifies whether to enable sorting and aggregation. Type: Boolean. Sorting can be enabled only for fields for which enable_sort_and_agg is set to true.
index Changes to this property will trigger replacement. boolean
Specifies whether to enable indexing for the column. Type: Boolean.
isArray Changes to this property will trigger replacement. boolean
Specifies whether the value is an array. Type: Boolean.
store Changes to this property will trigger replacement. boolean
Specifies whether to store the value of the field in the search index. Type: Boolean. If you set store to true, you can read the value of the field from the search index without querying the data table. This improves query performance.
field_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the field that is used to sort data. only required if sorter_type is FieldSort.
field_type
This property is required.
Changes to this property will trigger replacement.
str
Specifies the type of the field. Valid values: Text, Long, Double, Boolean, Keyword, Date, GeoPoint, Nested.
analyzer Changes to this property will trigger replacement. str
Specifies the type of the analyzer that you want to use. If fieldType is set to Text, you can configure this parameter. Otherwise, the default analyzer type single-word tokenization is used.
enable_sort_and_agg Changes to this property will trigger replacement. bool
Specifies whether to enable sorting and aggregation. Type: Boolean. Sorting can be enabled only for fields for which enable_sort_and_agg is set to true.
index Changes to this property will trigger replacement. bool
Specifies whether to enable indexing for the column. Type: Boolean.
is_array Changes to this property will trigger replacement. bool
Specifies whether the value is an array. Type: Boolean.
store Changes to this property will trigger replacement. bool
Specifies whether to store the value of the field in the search index. Type: Boolean. If you set store to true, you can read the value of the field from the search index without querying the data table. This improves query performance.
fieldName
This property is required.
Changes to this property will trigger replacement.
String
The name of the field that is used to sort data. only required if sorter_type is FieldSort.
fieldType
This property is required.
Changes to this property will trigger replacement.
String
Specifies the type of the field. Valid values: Text, Long, Double, Boolean, Keyword, Date, GeoPoint, Nested.
analyzer Changes to this property will trigger replacement. String
Specifies the type of the analyzer that you want to use. If fieldType is set to Text, you can configure this parameter. Otherwise, the default analyzer type single-word tokenization is used.
enableSortAndAgg Changes to this property will trigger replacement. Boolean
Specifies whether to enable sorting and aggregation. Type: Boolean. Sorting can be enabled only for fields for which enable_sort_and_agg is set to true.
index Changes to this property will trigger replacement. Boolean
Specifies whether to enable indexing for the column. Type: Boolean.
isArray Changes to this property will trigger replacement. Boolean
Specifies whether the value is an array. Type: Boolean.
store Changes to this property will trigger replacement. Boolean
Specifies whether to store the value of the field in the search index. Type: Boolean. If you set store to true, you can read the value of the field from the search index without querying the data table. This improves query performance.

SearchIndexSchemaIndexSetting
, SearchIndexSchemaIndexSettingArgs

RoutingFields Changes to this property will trigger replacement. List<string>
Specifies custom routing fields. You can specify some primary key columns as routing fields. Tablestore distributes data that is written to a search index across different partitions based on the specified routing fields. The data whose routing field values are the same is distributed to the same partition.
RoutingFields Changes to this property will trigger replacement. []string
Specifies custom routing fields. You can specify some primary key columns as routing fields. Tablestore distributes data that is written to a search index across different partitions based on the specified routing fields. The data whose routing field values are the same is distributed to the same partition.
routingFields Changes to this property will trigger replacement. List<String>
Specifies custom routing fields. You can specify some primary key columns as routing fields. Tablestore distributes data that is written to a search index across different partitions based on the specified routing fields. The data whose routing field values are the same is distributed to the same partition.
routingFields Changes to this property will trigger replacement. string[]
Specifies custom routing fields. You can specify some primary key columns as routing fields. Tablestore distributes data that is written to a search index across different partitions based on the specified routing fields. The data whose routing field values are the same is distributed to the same partition.
routing_fields Changes to this property will trigger replacement. Sequence[str]
Specifies custom routing fields. You can specify some primary key columns as routing fields. Tablestore distributes data that is written to a search index across different partitions based on the specified routing fields. The data whose routing field values are the same is distributed to the same partition.
routingFields Changes to this property will trigger replacement. List<String>
Specifies custom routing fields. You can specify some primary key columns as routing fields. Tablestore distributes data that is written to a search index across different partitions based on the specified routing fields. The data whose routing field values are the same is distributed to the same partition.

SearchIndexSchemaIndexSort
, SearchIndexSchemaIndexSortArgs

Sorters
This property is required.
Changes to this property will trigger replacement.
List<Pulumi.AliCloud.Ots.Inputs.SearchIndexSchemaIndexSortSorter>
Specifies the presorting method for the search index. PrimaryKeySort and FieldSort are supported. See sorter below.
Sorters
This property is required.
Changes to this property will trigger replacement.
[]SearchIndexSchemaIndexSortSorter
Specifies the presorting method for the search index. PrimaryKeySort and FieldSort are supported. See sorter below.
sorters
This property is required.
Changes to this property will trigger replacement.
List<SearchIndexSchemaIndexSortSorter>
Specifies the presorting method for the search index. PrimaryKeySort and FieldSort are supported. See sorter below.
sorters
This property is required.
Changes to this property will trigger replacement.
SearchIndexSchemaIndexSortSorter[]
Specifies the presorting method for the search index. PrimaryKeySort and FieldSort are supported. See sorter below.
sorters
This property is required.
Changes to this property will trigger replacement.
Sequence[SearchIndexSchemaIndexSortSorter]
Specifies the presorting method for the search index. PrimaryKeySort and FieldSort are supported. See sorter below.
sorters
This property is required.
Changes to this property will trigger replacement.
List<Property Map>
Specifies the presorting method for the search index. PrimaryKeySort and FieldSort are supported. See sorter below.

SearchIndexSchemaIndexSortSorter
, SearchIndexSchemaIndexSortSorterArgs

FieldName Changes to this property will trigger replacement. string
The name of the field that is used to sort data. only required if sorter_type is FieldSort.
Mode Changes to this property will trigger replacement. string
The sorting method that is used when the field contains multiple values. valid values: Min, Max, Avg. only required if sorter_type is FieldSort.
Order Changes to this property will trigger replacement. string
The sort order. Data can be sorted in ascending(Asc) or descending(Desc) order. Default value: Asc.
SorterType Changes to this property will trigger replacement. string
Data is sorted by Which fields or keys. valid values: PrimaryKeySort, FieldSort.
FieldName Changes to this property will trigger replacement. string
The name of the field that is used to sort data. only required if sorter_type is FieldSort.
Mode Changes to this property will trigger replacement. string
The sorting method that is used when the field contains multiple values. valid values: Min, Max, Avg. only required if sorter_type is FieldSort.
Order Changes to this property will trigger replacement. string
The sort order. Data can be sorted in ascending(Asc) or descending(Desc) order. Default value: Asc.
SorterType Changes to this property will trigger replacement. string
Data is sorted by Which fields or keys. valid values: PrimaryKeySort, FieldSort.
fieldName Changes to this property will trigger replacement. String
The name of the field that is used to sort data. only required if sorter_type is FieldSort.
mode Changes to this property will trigger replacement. String
The sorting method that is used when the field contains multiple values. valid values: Min, Max, Avg. only required if sorter_type is FieldSort.
order Changes to this property will trigger replacement. String
The sort order. Data can be sorted in ascending(Asc) or descending(Desc) order. Default value: Asc.
sorterType Changes to this property will trigger replacement. String
Data is sorted by Which fields or keys. valid values: PrimaryKeySort, FieldSort.
fieldName Changes to this property will trigger replacement. string
The name of the field that is used to sort data. only required if sorter_type is FieldSort.
mode Changes to this property will trigger replacement. string
The sorting method that is used when the field contains multiple values. valid values: Min, Max, Avg. only required if sorter_type is FieldSort.
order Changes to this property will trigger replacement. string
The sort order. Data can be sorted in ascending(Asc) or descending(Desc) order. Default value: Asc.
sorterType Changes to this property will trigger replacement. string
Data is sorted by Which fields or keys. valid values: PrimaryKeySort, FieldSort.
field_name Changes to this property will trigger replacement. str
The name of the field that is used to sort data. only required if sorter_type is FieldSort.
mode Changes to this property will trigger replacement. str
The sorting method that is used when the field contains multiple values. valid values: Min, Max, Avg. only required if sorter_type is FieldSort.
order Changes to this property will trigger replacement. str
The sort order. Data can be sorted in ascending(Asc) or descending(Desc) order. Default value: Asc.
sorter_type Changes to this property will trigger replacement. str
Data is sorted by Which fields or keys. valid values: PrimaryKeySort, FieldSort.
fieldName Changes to this property will trigger replacement. String
The name of the field that is used to sort data. only required if sorter_type is FieldSort.
mode Changes to this property will trigger replacement. String
The sorting method that is used when the field contains multiple values. valid values: Min, Max, Avg. only required if sorter_type is FieldSort.
order Changes to this property will trigger replacement. String
The sort order. Data can be sorted in ascending(Asc) or descending(Desc) order. Default value: Asc.
sorterType Changes to this property will trigger replacement. String
Data is sorted by Which fields or keys. valid values: PrimaryKeySort, FieldSort.

Import

OTS search index can be imported using id, e.g.

$ pulumi import alicloud:ots/searchIndex:SearchIndex index1 <instance_name>:<table_name>:<index_name>:<index_type>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.