简体   繁体   English

ckan收获配置中的default_groups

[英]default_groups in ckan harvesting configuration

I'm using Ckan 2.5.1 with harvesting extension and Geonetwork harvesting extension. 我正在将Ckan 2.5.1与收获扩展和Geonetwork收获扩展一起使用。 In harvesting configuration page I set 在收获配置页面中,我设置了

{
 "api_version": 3,
 "cql":"any LIKE 'urbanistica'",
 "default_groups":["urbanistica"]
}

in order to filter datasets to harvest and to assign them to existing group urbanistica . 为了过滤数据集以收集并将其分配给现有的urbanistica组。

All filtered datasets are created into ckan, from a geonetwork CSW, but no one dataset is assigned to urbanistica group. 所有过滤的数据集都从地理网络CSW创建到ckan中,但是没有一个数据集分配给urbanistica组。

It seems default_groups is ignored because of no error is logged into log files. 似乎default_groups被忽略了,因为没有错误记录到日志文件中。

I'm missing other configurations or settings (as in production.ini )? 我缺少其他配置或设置(如production.ini )吗?

You're using ckanext-spatial's CSW harvester , which accepts the cql option, but not the default_groups option, which is why it doesn't work. 您正在使用ckanext-spatial的CSW收割机 ,该收割机接受cql选项,但不接受default_groups选项,这就是为什么它不起作用的原因。

You're probably getting confused with the CKAN harvester (ie CKAN harvesting from other CKAN servers), which does accept the default_groups option. 您可能对CKAN收割机 (即从其他CKAN服务器收割的CKAN收割机)感到困惑,它确实接受default_groups选项。

You could probably easily copy the default_groups code from the CKAN harvester to the CSV harvester (well actually into its base class SpatialHarvester ), and submit that as a Pull Request. 您可能可以轻松地将default_groups代码从CKAN收集器复制到CSV收集器(实际上已经复制到其基类SpatialHarvester中 ),并将其作为请求请求提交。 It already has default_tags and default_extras, so adding default_groups makes sense. 它已经具有default_tags和default_extras,因此添加default_groups很有意义。

Thanks for your answer. 感谢您的回答。 I finally realized I'm using ckanext-geonetwork that has its own configuration parameters, different from CKAN harvester. 我终于意识到我正在使用ckanext-geonetwork ,它具有自己的配置参数,与CKAN收割机不同。 Corresponding of 'default_groups' is 'group_mapping' Teresa “ default_groups”的对应项是“ group_mapping” Teresa

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM