ExAliyunOts.create_search_index
You're seeing just the function
create_search_index
, go back to ExAliyunOts module for more information.
Specs
create_search_index(instance(), table_name(), index_name(), options()) :: result()
Official document in Chinese | English
Example
import MyApp.TableStore
create_search_index "table", "index_name",
field_schemas: [
field_schema_keyword("name"),
field_schema_integer("age")
]
create_search_index "table", "index_name",
field_schemas: [
field_schema_keyword("name"),
field_schema_geo_point("location"),
field_schema_integer("value")
]
create_search_index "table", "index_name",
field_schemas: [
field_schema_nested(
"content",
field_schemas: [
field_schema_keyword("header"),
field_schema_keyword("body")
]
)
]
Options
:field_schemas
, required, a list of predefined search-index schema fields, please see the following helper functions::index_sorts
, optional, a list of predefined sort-index schema fields, please see the following helper functions: