图引擎服务 GES-新建索引:请求参数

时间:2024-09-04 15:52:36

请求参数

表2 Body参数说明

参数

是否必选

类型

说明

indexName

String

索引名称。只能包含字母,数字,-和_。不能包含其他字符。索引名称的长度需在63字符以内。

indexType

String

索引的类型,区分大小写。

  • “GlobalCompositeVertexIndex”为全局的Composite类型的点索引。
  • “GlobalCompositeEdgeIndex”为全局的Composite类型的边索引。
  • “CompositeVertexIndex”为局部的Composite类型的点索引。
  • “CompositeEdgeIndex”为局部的Composite类型的边索引。
  • “FullTextIndex”为全文索引。

hasLabel

Boolean

是否有label,默认为false。

  • true
  • false

indexLabel

List

Label列表,仅在indexType为CompositeVertexIndex或CompositeEdgeIndex时有效,而且为必填项,用来指定在哪些label上建立索引。

indexProperty

否(若hasLabel为false或null,则该项为必选)

List

索引的属性列表。

可以创建索引的属性类型有: integer、 float、 double、 long、 enum、 string、 date。

  • 如果属性类型为string,属性长度建议不要超过40个字节,超出的部分会被截断。
  • Cypher查询可以借助hasLabel为True的索引来加速。
    • indexProperty为空时,建立的索引为label索引,可以加速label过滤。
    • indexProperty不为空时,建立的索引为属性索引,可以加速对应的属性过滤。
support.huaweicloud.com/api-ges/ges_03_0454.html