修改密码

请输入密码
请输入密码 请输入8-64长度密码 和 email 地址不相同 至少包括数字、大写字母、小写字母、半角符号中的 3 个
请输入密码
提交

修改昵称

当前昵称:
提交

申请证书

证书详情

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

服务器的MAC地址

Please complete this required field.

Please complete this required field.

取消
申请
ID
产品
状态
核数
申请天数
审批时间
过期时间
MAC地址
申请理由
审核信息
关闭
基础信息
  • 用户昵称:
  • 手机号:
  • 公司名称:
  • 公司邮箱:
  • 地区:
  • 语言:
修改密码
申请证书

当前未申请证书.

申请证书
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

ProductName CreateTime ID Price File
ProductName CreateTime ID Price File

No Invoice

v5.0
搜索
    v5.0

      查询加速

      本节介绍用于管理图中各类属性索引及LTE状态的方法。

      索引

      showIndex()

      获取图中全部索引。

      参数

      • config: RequestConfig(可选):请求配置。

      返回值

      • List[Index]:获取的索引列表。

      # Retrieves indexes in the graph 'miniCircle'
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      indexList = Conn.showIndex(requestConfig)
      for index in indexList:
          print(index.toJSON())
      

      {"id": "1", "name": "age_index", "properties": "year", "schema": "account", "status": "DONE", "size": null, "dbType": "DBNODE"}
      {"id": "2", "name": "test_index", "properties": "year,float", "schema": "account", "status": "DONE", "size": null, "dbType": "DBNODE"}
      {"id": "1", "name": "targetPostInd", "properties": "targetPost", "schema": "disagree", "status": "DONE", "size": null, "dbType": "DBEDGE"}
      

      showNodeIndex()

      获取图中全部点索引。

      参数

      • config: RequestConfig(可选):请求配置。

      返回值

      • List[Index]:获取的索引列表。

      # Retrieves node indexes in the graph 'miniCircle'
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      indexList = Conn.showNodeIndex(requestConfig)
      for index in indexList:
          print(index.toJSON())
      

      {"id": "1", "name": "age_index", "properties": "year", "schema": "account", "status": "DONE", "size": null, "dbType": "DBNODE"}
      {"id": "2", "name": "test_index", "properties": "year,float", "schema": "account", "status": "DONE", "size": null, "dbType": "DBNODE"}
      

      showEdgeIndex()

      获取图中全部边索引。

      参数

      • config: RequestConfig(可选):请求配置。

      返回值

      • List[Index]:获取的索引列表。

      # Retrieves edge indexes in the graph 'miniCircle'
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      indexList = Conn.showEdgeIndex(requestConfig)
      for index in indexList:
          print(index.toJSON())
      

      {"id": "1", "name": "targetPostInd", "properties": "targetPost", "schema": "disagree", "status": "DONE", "size": null, "dbType": "DBEDGE"}
      

      dropIndex()

      从图中删除一个指定的索引。

      参数

      • dbType: DBType:索引类型(点或边)。
      • indexName: str:索引名称。
      • config: RequestConfig(可选):请求配置。

      返回值

      • Response:请求结果。

      # Drops the node index 'test_index' from the graph 'miniCircle'
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      response = Conn.dropIndex(DBType.DBNODE, "test_index", requestConfig)
      print(response.status.code.name)
      

      SUCCESS
      

      dropNodeIndex()

      从图中删除一个指定的点索引。

      参数

      • indexName: str:索引名称。
      • config: RequestConfig(可选):请求配置。

      返回值

      • Response:请求结果。

      # Drops the node index 'test_index' from the graph 'miniCircle'
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      response = Conn.dropNodeIndex("test_index", requestConfig)
      print(response.status.code.name)
      

      SUCCESS
      

      dropEdgeIndex()

      从图中删除一个指定的边索引。

      参数

      • indexName: str:索引名称。
      • config: RequestConfig(可选):请求配置。

      返回值

      • Response:请求结果。

      # Drops the edge index 'targetPostInd' from the graph 'miniCircle'
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      response = Conn.dropEdgeIndex("targetPostInd", requestConfig)
      print(response.status.code.name)
      

      SUCCESS
      

      全文索引

      showFulltext()

      获取图中全部全文索引。

      参数

      • config: RequestConfig(可选):请求配置。

      返回值

      • List[Index]:获取的全文索引列表。

      # Retrieves full-text indexes in the graph 'miniCircle'
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      fulltextList = Conn.showFulltext(requestConfig)
      for fulltext in fulltextList:
          print(fulltext.toJSON())
      

      {"id": null, "name": "name", "properties": "name", "schema": "account", "status": "DONE", "size": null, "dbType": "DBNODE"}
      {"id": null, "name": "Content", "properties": "content", "schema": "review", "status": "DONE", "size": null, "dbType": "DBEDGE"}
      

      showNodeFulltext()

      获取图中全部点的全文索引。

      参数

      • config: RequestConfig(可选):请求配置。

      返回值

      • List[Index]:获取的全文索引列表。

      # Retrieves node full-text indexes in the graph 'miniCircle'
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      fulltextList = Conn.showNodeFulltext(requestConfig)
      for fulltext in fulltextList:
          print(fulltext.toJSON())
      

      {"id": null, "name": "name", "properties": "name", "schema": "account", "status": "DONE", "size": null, "dbType": "DBNODE"}
      

      showEdgeFulltext()

      获取图中全部边的全文索引。

      参数

      • config: RequestConfig(可选):请求配置。

      返回值

      • List[Index]:获取的全文索引列表。

      # Retrieves edge full-text indexes in the graph 'miniCircle'
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      fulltextList = Conn.showEdgeFulltext(requestConfig)
      for fulltext in fulltextList:
          print(fulltext.toJSON())
      

      {"id": null, "name": "Content", "properties": "content", "schema": "review", "status": "DONE", "size": null, "dbType": "DBEDGE"}
      

      createFulltext()

      在图中创建一个全文索引。

      参数

      • dbType: DBType:全文索引类型(点或边)。
      • schemaName: str:Schema名称。
      • propertyName: str:属性名称。
      • indexName: str:全文索引名称。
      • config: RequestConfig(可选):请求配置。

      返回值

      • JobResponse:请求结果。

      # Creates a full-text index 'moviePlot' for the property 'plot' of the 'movie' nodes
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      response = Conn.createFulltext(DBType.DBNODE, 'movie', 'plot', 'moviePlot', requestConfig)
      jobID = response.jobId
      
      time.sleep(3)
      jobs = Conn.showJob(jobID, requestConfig)
      for job in jobs:
          print(job.status)
      

      FINISHED
      

      createNodeFulltext()

      在图中创建一个点的全文索引。

      参数

      • schemaName: str:Schema名称。
      • propertyName: str:属性名称。
      • indexName: str:全文索引名称。
      • config: RequestConfig(可选):请求配置。

      返回值

      • JobResponse:请求结果。

      # Creates a full-text index 'moviePlot' for the property 'plot' of the 'movie' nodes
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      response = Conn.createNodeFulltext('movie', 'plot', 'moviePlot', requestConfig)
      jobID = response.jobId
      
      time.sleep(3)
      jobs = Conn.showJob(jobID, requestConfig)
      for job in jobs:
          print(job.status)
      

      FINISHED
      

      createEdgeFulltext()

      在图中创建一个边的全文索引。

      参数

      • schemaName: str:Schema名称。
      • propertyName: str:属性名称。
      • indexName: str:全文索引名称。
      • config: RequestConfig(可选):请求配置。

      返回值

      • JobResponse:请求结果。

      # Creates a full-text index 'agreeNotes' for the property 'notes' of the 'agree' edges
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      response = Conn.createEdgeFulltext('agree', 'notes', 'agreeNotes', requestConfig)
      jobID = response.jobId
      
      time.sleep(3)
      jobs = Conn.showJob(jobID, requestConfig)
      for job in jobs:
          print(job.status)
      

      FINISHED
      

      dropFulltext()

      从图中删除一个指定的全文索引。

      参数

      • dbType: DBType:全文索引类型(点或边)。
      • fulltextName: str:全文索引名称。
      • config: RequestConfig(可选):请求配置。

      返回值

      • Response:请求结果。

      # Drops the node full-index 'moviePlot' from the graph 'miniCircle'
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      response = Conn.dropFulltext(DBType.DBNODE, 'moviePlot',requestConfig)
      print(response.status.code.name)
      

      SUCCESS
      

      LTE

      lte()

      将一个属性加载到计算引擎。

      参数

      • dbType: DBType:属性类型(点或边)。
      • propertyName: str:属性名称。
      • schemaName: str(可选):schema名称;忽略时指定全部schema。
      • config: RequestConfig(可选):请求配置。

      返回值

      • JobResponse:请求结果。

      # Loads the property 'year' of 'account' nodes to the computing engine
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      response = Conn.lte(DBType.DBNODE, "year", "account", requestConfig)
      jobID = response.jobId
      
      time.sleep(3)
      jobs = Conn.showJob(jobID, requestConfig)
      for job in jobs:
          print(job.id, "-", job.status)
      

      53 - FINISHED
      53_1 - FINISHED
      53_2 - FINISHED
      53_3 - FINISHED
      

      ufe()

      将一个属性从计算引擎卸载。

      参数

      • dbType: DBType:属性类型(点或边)。
      • propertyName: str:属性名称。
      • schemaName: str(可选):schema名称;忽略时指定全部schema。
      • config: RequestConfig(可选):请求配置。

      返回值

      • Response:请求结果。

      # Unloads the property 'year' of 'account' nodes from the computing engine
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      response = Conn.ufe(DBType.DBNODE, "year", "account", requestConfig)
      print(response.status.code.name)
      

      SUCCESS
      

      完整示例

      from ultipa import UltipaConfig, Connection, RequestConfig
      
      ultipaConfig = UltipaConfig()
      # URI example: ultipaConfig.hosts = ["mqj4zouys.us-east-1.cloud.ultipa.com:60010"]
      ultipaConfig.hosts = ["192.168.1.85:60061", "192.168.1.87:60061", "192.168.1.88:60061"]
      ultipaConfig.username = "<username>"
      ultipaConfig.password = "<password>"
      
      Conn = Connection.NewConnection(defaultConfig=ultipaConfig)
      
      # Retrieves indexes in the graph 'miniCircle'
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      indexList = Conn.showIndex(requestConfig)
      for index in indexList:
          print(index.toJSON())
      
      请完成以下信息后可下载此书
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写