我试图与Autodesk Construction Cloud实施集成,我想允许用户在项目文件文件夹中执行搜索。我在RN上工作的是文件查看器。
似乎搜索请求只能与3腿验证代币一起使用( documentation ),这似乎非常奇怪,因为我们可以轻松地在所有文件夹上导航并在无需用户上下文的情况下手动找到所需的文件,所以我无法理解为什么3--这里需要腿部令牌,但这不是问题。
我想无需三足令牌即可实施搜索,所以问题是什么是在使用Forge API中实现文件搜索的最佳方法,而无需用户上下文?我想知道有人知道的人Forge API可以建议我一些好的方法。
I'am trying to implement an integration with Autodesk Construction Cloud, and I want to allow users to perform search within Project Files folder. What I'am working on rn is a Files Viewer.
It seems like search requests can be only used with 3-legged auth token(documentation), it seems super strange, because we can easily navigate on all folders and find required files manually without required user context, so I cannot understand why 3-legged token required here, but it is not the question.
I want to implement search without 3-legged token, so question here is what will be the best approach to implement files search within folders and subfolders using Forge API without required user context? I guess that somebody who knows Forge API can suggest me some good approach.
发布评论
评论(1)
您是对的,搜索需要3LO,这里的最大优势是您可以递归地使用它。
为了避免需要3LO,您可以使用获取文件夹内容递归,就像我们。
请注意,您还可以组合有了这个请求,
并充分利用 elasticsearch 进行搜索。
还有一个示例使用elasticsearch 在这里(在这种情况下,基于模型元数据搜索)。
You're right, search requires 3LO and the great advantage here is that you can use it recursively.
To avoid the need of 3LO you can use Get folder contents recursively, as we did here.
Note that you can also combine filters with this request,
and take advantage of Elasticsearch for searching.
There's also a sample using Elasticsearch here (in this case to search based on models metadata).