简体   繁体   English

通过 slate 的指南针搜索请求 - Palantir Foundry

[英]Compass Search request through slate - Palantir Foundry

I'm trying to create a Slate application which uses the compass search endpoint.我正在尝试创建一个使用罗盘search端点的 Slate 应用程序。

I've managed to connect to the endpoint trough postman just fine using <host>/foundry-search/api/compass/v0/search , and get the desired results.我已经成功地使用<host>/foundry-search/api/compass/v0/search连接到端点槽 postman ,并获得了想要的结果。

However in Slate I'm unable to get a 200 response with the same query, using search in the path, example:但是在 Slate 中,我无法使用相同的查询获得 200 响应,在路径中使用search ,例如:

{
    "path": "search",
    "method": "POST",
    "bodyJson": {
        "query": {},
        "limit": 5
    },
    "extractors": {
        "results": "$"
    },
    "headers": {
        "Content-Type": "application/json",
        "Content-Length": 64
    }
}

Other compass endpoints work fine, its just the search one I cant manage to work out.其他指南针端点工作正常,只是我无法解决的搜索问题。 For this query in particular I get 500, with errorCode INTERNAL .特别是对于这个查询,我得到 500,errorCode INTERNAL Is there any magic trick one needs to do for search?搜索需要什么魔术吗?

From the layout of the request, it looks like the Compass datasource being queried has been configured with an HttpJson type.从请求的布局来看,被查询的 Compass 数据源似乎配置了HttpJson类型。 It's generally not recommended to query Foundry services through the HttpJson configuration as certain endpoints may only be considered internally supported, and liable to change at any time (which could possibly break your Slate application without warning).通常不建议通过HttpJson配置查询 Foundry 服务,因为某些端点可能仅被认为是内部支持的,并且随时可能更改(这可能会在没有警告的情况下破坏您的 Slate 应用程序)。

Slate datasources that point to Foundry services should be configured as a ServiceApi type as they provide an easy editor layout that displays available supported endpoints, endpoint parameter inputs (with Handlebar support), and the expected parameter types.指向 Foundry 服务的 Slate 数据源应配置为ServiceApi类型,因为它们提供了一个简单的编辑器布局,可显示可用的支持端点、端点参数输入(具有 Handlebar 支持)和预期的参数类型。

Please contact your Palantir rep and ask for the Compass service to be configured as a ServiceApi with the search Compass endpoint enabled.请联系您的 Palantir 代表,并要求将 Compass 服务配置为启用search Compass 端点的ServiceApi Doing so will allow you to query any supported Compass endpoint without needing to worry about correctly formatting the HttpJson structure, or guessing which endpoint parameters are required.这样做将允许您查询任何受支持的 Compass 端点,而无需担心正确格式化 HttpJson 结构,或猜测需要哪些端点参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Slate 应用程序中显示存储在 Palantir Foundry 数据集中的 PDF 文件 - Displaying a PDF file stored in a Dataset on Palantir Foundry in Slate Application 我们如何通过 palantir 代工厂中的 slate 集成外部 rest api 调用? - How can we integrate an external rest api call via slate in palantir foundry? 是否可以在 Palantir-Foundry 的 Slate 中定义另一个车把内的车把? - Is it possible to define a handlebars inside another handlebars in Slate within Palantir-Foundry? 在 Palantir Foundry 中进行测试 - Testing in Palantir Foundry 如何通过 API 调用获取 Palantir Foundry 中数据集的完整元数据? - How to get complete metadata of dataset in Palantir Foundry through API call? 如何在 Palantir Foundry 中测试转换? - How to test a transformation in Palantir Foundry? 如何在 Palantir Foundry 的 Python 转换中传递数据集元数据,如 hash 或时间戳? - How can I pass through dataset metadata, like a hash or timestamp, in a Python Transform in Palantir Foundry? Palantir Foundry 中是否有 AMQP 数据连接器? - Is there an AMQP data connector in Palantir Foundry? 查看 Palantir Foundry 中的组织成员 - View members of Organizations in Palantir Foundry Palantir Foundry 中轮廓结果的快照 - Snapshotting of Contour results in Palantir Foundry
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM