使用 Neo4J REST 服务器时如何返回查询的 Lucene 分数?
到目前为止我已经能够使用 Lucene 查询语法了。现在我需要能够通过修改查询行来返回节点上的分数和命中数:
GET http://localhost:7474/db/data/index/node/myIndex?query=myKey:myValue
换句话说,我不想创建嵌入图数据库,因为我正在尝试访问我保存在 REST 服务器中的数据。关于如何返回分数和命中数有什么建议吗?
我是否可以创建 Lucene 提供的类的实例来执行此操作?
谢谢!
I have been able to use the Lucene query syntax so far. Now I need to be able to return the scores and number of hits on nodes by modifying my query line:
GET http://localhost:7474/db/data/index/node/myIndex?query=myKey:myValue
In other words, I do not want to have to create an embedded graph database because I am trying to access the data I have saved in my REST server. Any suggestions on how to return the score and hits?
Could I perhaps create an instance of a class that Lucene offers to do this?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为此,您可能需要编写一个小型 Neo4j Server 非托管扩展,因为这超出了核心 REST API,请参阅 http://docs.neo4j.org/chunked/snapshot/server-unmanagement-extensions.html 了解详细信息。作为参数,您可以采用索引、评分参数和查询。
那会有帮助吗?
/彼得
to do this, you will probably have to write a small scoring Neo4j Server unmanaged extension, since this is outside the core REST API, see http://docs.neo4j.org/chunked/snapshot/server-unmanaged-extensions.html for details. As parameters you could take the index, and the scoring parameters and the query.
Would that help?
/peter