【问题标题】:Is it possible to add types for facets in a dgraph schema?是否可以在 dgraph 模式中为构面添加类型?
【发布时间】:2019-10-11 02:59:37
【问题描述】:

我发现我需要在架构中将谓词类型指定为 int ,否则数字将存储为类型 float

MyNumericalProperty: int @index(int) .

我的方面也是数字,在从 dgraph 返回的 JSON 中,它们看起来像这样:

"MyProperty|MyPropertyFacet":1.000000

有没有办法将它作为 int 添加到架构中?

【问题讨论】:

    标签: dgraph


    【解决方案1】:

    不,切面不是一等公民。所以你无法定义它。如果你有一个很好的用例,也许打开一个问题来请求这个功能会很有趣。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-02
      • 1970-01-01
      • 1970-01-01
      • 2012-07-28
      • 1970-01-01
      • 2011-09-24
      相关资源
      最近更新 更多