如何使用aql、蓝图和http接口在arangodb图形中进行全文查询?

如何使用aql、蓝图和http接口在arangodb图形中进行全文查询?,arangodb,aql,Arangodb,Aql,比如说,我有属性“text”的顶点和该属性的全文索引 在arango 2.1.2 shell中,我可以使用 g._vertices.fulltext("text","my text value") 或db.v.fulltext(“文本”、“我的文本值”) 但是如果我使用blueprints-arangodb-graph-1.0.8,blueprint实现激发的请求看起来像 http://{arangodb}/_db/testdb/_api/graph/test_graph/vertices

比如说,我有属性“text”的顶点和该属性的全文索引

在arango 2.1.2 shell中,我可以使用

g._vertices.fulltext("text","my text value")
db.v.fulltext(“文本”、“我的文本值”)

但是如果我使用blueprints-arangodb-graph-1.0.8,blueprint实现激发的请求看起来像

http://{arangodb}/_db/testdb/_api/graph/test_graph/vertices
与正文一起:

{"batchSize":1,"count":false,"filter":{"properties":[{"key":"text","value":"my text value":"=="}]}}
这是非常低效的,因为它迭代每个顶点

那么,是否有可能以高效的方式进行查询

  • aql
  • 蓝图
  • 和http接口
非常感谢

更新: 我通过HTTP找到了简单的全文查询

http://{arangodb}/_db/testdb/_api/simple/fulltext
和机构:

{ "collection": "test_vertices", "attribute" : "text", "query" : "my text value" }
更新-2 我发现AQL:

FOR v in FULLTEXT(test_vertices, 'text', 'my text value') RETURN v

假设集合称为“顶点”,属性称为“文本”

在AQL中,您可以使用“全文”(请参阅):

对于HTTP,您可以使用AQL的HTTP接口和上面的全文函数


或者,您可以使用“PUT/_api/simple/fulltext”端点直接执行全文搜索(请参阅)。

这看起来更简单,但没有可用的光标。
arangosh [_system]> db._query("return FULLTEXT(vertices, 'text', 'hallo')").toArray()
[ 
  [ 
    { 
      "_id" : "vertices/268953710", 
      "_rev" : "268953710", 
      "_key" : "268953710", 
      "text" : "hallo hugo" 
    }, 
    { 
      "_id" : "vertices/269150318", 
      "_rev" : "269150318", 
      "_key" : "269150318", 
      "text" : "hallo emil" 
    }, 
    { 
      "_id" : "vertices/268757102", 
      "_rev" : "268757102", 
      "_key" : "268757102", 
      "text" : "hallo world" 
    } 
  ] 
]