【发布时间】:2020-05-02 00:24:56
【问题描述】:
所以SPARQL documentation 包含如何指定要搜索的多个字段的示例:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX neptune-fts: <http://aws.amazon.com/neptune/vocab/v01/services/fts#>
SELECT * WHERE {
SERVICE neptune-fts:search {
neptune-fts:config neptune-fts:endpoint 'http://your-es-endpoint.com' .
neptune-fts:config neptune-fts:queryType 'query_string' .
neptune-fts:config neptune-fts:query 'mikael~ OR rondelli' .
neptune-fts:config neptune-fts:field foaf:name .
neptune-fts:config neptune-fts:field foaf:surname .
neptune-fts:config neptune-fts:return ?res .
}
}
我正在尝试做同样的事情,但在 Gremlin 中:
g.withSideEffect('Neptune#fts.endpoint', '...')
.V().has(['name', 'company'], 'Neptune#fts term*')
这显然行不通。现在我可以像这样使用通配符了:
g.withSideEffect('Neptune#fts.endpoint', '...')
.V().has('*', 'Neptune#fts term*')
但现在我匹配了所有字段,但它失败了,因为我们的索引太多了。 (我认为有 1,024 个限制。)
知道如何在 Gremlin 查询中指定要搜索的字段列表吗?
【问题讨论】:
标签: elasticsearch gremlin amazon-neptune