OrientDB:如何使用来自其他顶点的数据更新字段

OrientDB:如何使用来自其他顶点的数据更新字段,orientdb,Orientdb,我正在处理一些文档,试图实现TF-IDF方法来搜索文档的相似性。 在某一点上,我需要计算术语频率(TF)。 我有两个顶点: Documento-->DocWord DocWord vertex具有以下字段: 整数频率 双tf 双idf Documento有: 整数字数 我需要用以下内容更新所有DocWord tf字段: 频率/文档o.wordCount 我尝试运行的查询是: 更新DocWord set tf=frequence/in(“Documento_docwords”)。字数[0] 但这失

我正在处理一些文档,试图实现TF-IDF方法来搜索文档的相似性。 在某一点上,我需要计算术语频率(TF)。 我有两个顶点: Documento-->DocWord

DocWord vertex具有以下字段: 整数频率 双tf 双idf

Documento有: 整数字数

我需要用以下内容更新所有DocWord tf字段: 频率/文档o.wordCount

我尝试运行的查询是:

更新DocWord set tf=frequence/in(“Documento_docwords”)。字数[0]

但这失败了。

尝试以下方法:

update DocWord set tf = (frequence / in("Documento_docwords").wordCount[0])

你在运行哪个版本的OrientDB?奇怪,我已经在两个版本上测试过了。您使用哪个版本?我已将数据库更新为3.0.6,并且可以正常工作。在2.2.29中发现了错误。