CKAN可以支持Solr 7.0吗? [英] Can CKAN support Solr 7.0?

查看:149
本文介绍了CKAN可以支持Solr 7.0吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Ubuntu 16.04中安装Solr 7.0和CKAN 2.7.2.但是,我遇到以下错误:

I am trying to install Solr 7.0 and CKAN 2.7.2 in Ubuntu 16.04. However, I got the following errors:

在Solr管理员网站上:

ckan:org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:无法为核心ckan加载conf:无法加载架构/var/solr/data/ckan/conf/schema .xml:自Solr 7起不支持在架构中设置defaultSearchField

ckan: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core ckan: Can't load schema /var/solr/data/ckan/conf/schema.xml: Setting defaultSearchField in schema not supported since Solr 7

在启动数据库时从CKAN安装:

Solr响应错误(HTTP 404):[原因:未找到错误404]

Solr responded with an error (HTTP 404): [Reason: Error 404 Not Found]

所以我想知道CKAN是否可以支持最新版本的Solr.当前,CKAN 2.7.2可以通过Jetty8支持Solr 4.6.

So I wonder whether CKAN could support the newest version of Solr. Currently, CKAN 2.7.2 can support Solr 4.6 with Jetty8.

推荐答案

经过一番修补,并使用有关

After some tinkering, and using this page about Solr 6.5 with CKAN as a starting point, I managed to use CKAN 2.8 with Solr 7.4 in Ubuntu 18.04:

1)在CKAN .ini配置文件中, solr_url必须包含核心名称,否则对Solr的CKAN调用将失败( SearchError:SOLR返回了运行查询的错误... [原因:未找到错误404] ... )

1) in the CKAN .ini configuration file, solr_url must include the core name, otherwise CKAN calls to Solr fail (SearchError: SOLR returned an error running query ... [Reason: Error 404 Not Found] ...)

例如solr_url = http://127.0.0.1:8983/solr/ckan/其中ckan是Solr核心名称

e.g. solr_url = http://127.0.0.1:8983/solr/ckan/ where ckan is the Solr core name

2)在xml Solr模式中,替换

2) in the xml Solr schema, replace

<defaultSearchField>text</defaultSearchField>
<solrQueryParser defaultOperator="AND"/>

使用

<df>text</df>
<solrQueryParser q.op="AND"/>

,因为这些功能已被弃用( 2 )

as those features have been deprecated (1, 2)

这篇关于CKAN可以支持Solr 7.0吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆