跑道API:如何搜索除商品评论外的所有字段?
Podio API: how to search in all fields except item comments?
我需要在特定作品中搜索文本space。我需要所有项目和字段, 除了评论 。
我正在为跑道 API 和 Search in space 功能使用 php-wrapper:
$attributes = array(
"query" => $query,
"ref_type" => "item", // I need just items, not tasks, statuses etc.
"search_fields" => "title"
);
$items = PodioSearchResult::space( $space_id, $attributes );
如果删除search_fields
参数,它不仅会搜索标题,还会搜索所有字段。但是,它还会搜索每个项目留下的评论,结果是 return 个项目。但我只需要基于字段值的结果。
当然可以在search_fields
中列出所有需要的字段。但是 space 中有十几个应用程序,每个应用程序都有十几个不同的领域。此外,workspace 用户可以添加、编辑或删除字段。因此,列出所有字段看起来是一个非常粗略且 hard-coded 的解决方案。
还有其他方法可以避免在搜索结果中出现评论吗?
跑道没有特定的方法来避免只评论。但不是对所有字段进行硬编码,您可以动态查询 "Get app values" 调用并使用 "search_fields" 中的结果。
我需要在特定作品中搜索文本space。我需要所有项目和字段, 除了评论 。
我正在为跑道 API 和 Search in space 功能使用 php-wrapper:
$attributes = array(
"query" => $query,
"ref_type" => "item", // I need just items, not tasks, statuses etc.
"search_fields" => "title"
);
$items = PodioSearchResult::space( $space_id, $attributes );
如果删除search_fields
参数,它不仅会搜索标题,还会搜索所有字段。但是,它还会搜索每个项目留下的评论,结果是 return 个项目。但我只需要基于字段值的结果。
当然可以在search_fields
中列出所有需要的字段。但是 space 中有十几个应用程序,每个应用程序都有十几个不同的领域。此外,workspace 用户可以添加、编辑或删除字段。因此,列出所有字段看起来是一个非常粗略且 hard-coded 的解决方案。
还有其他方法可以避免在搜索结果中出现评论吗?
跑道没有特定的方法来避免只评论。但不是对所有字段进行硬编码,您可以动态查询 "Get app values" 调用并使用 "search_fields" 中的结果。