gpt4 book ai didi

gentics-mesh - 如何通过 Gentics Mesh 中的 webroot 路径获取节点的子节点?

转载 作者:行者123 更新时间:2023-12-04 22:55:51 26 4
gpt4 key购买 nike

我有一个父节点的 webroot 路径,想返回这个节点的子节点。
使用 https://demo.getmesh.io/api/v1/demo/webroot/images/例如只产生节点本身。

最佳答案

不幸的是,仅使用 webroot 是不可能的。但是,还有其他方法可以实现:

  • 使用 GraphQL-Enpoint例如,通过使用此查询:
    query childrenByWebroot($path: String) {
    node(path: $path) {
    uuid
    children {
    elements {
    uuid
    }
    }
    }
    }

    这只会加载子项和父项的所有 UUID。如需更多功能,请查看 Docs of GraphQL想要查询更多的信息。
  • 首先从 webroot 加载节点,然后通过 Children-Endpoint 加载子节点:/api/v1/<project>/nodes/<uuid>/children
  • Search for Nodes其中以 webroot-element 作为父元素。这允许您在需要时更清楚地过滤内容:
    {
    "query": {
    "bool": {
    "must": [
    {
    "term": {
    "parentNode.uuid": "<uuid>"
    },
    // ... Other checks
    }
    ]
    }
    }
    }
  • 关于gentics-mesh - 如何通过 Gentics Mesh 中的 webroot 路径获取节点的子节点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47264494/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com