将solr 1.4指数升级到solr 3.3? [英] Upgrade solr 1.4 index to solr 3.3?

查看:183
本文介绍了将solr 1.4指数升级到solr 3.3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用apache solr 1.4的现有索引构建。

I have an existing index build using apache solr 1.4.

我想在版本3.3中使用这个现有索引。如你所知,索引格式在3.x之后改变了,那么怎么可能这样做?

I want to use this existing index in version 3.3. As you know the index format is changed after 3.x, so how is it possible to do this?

我已经导出了现有索引(即1.4版本)使用Luke转换为XML。

I have exported the existing index (that is in 1.4 version) using Luke to XML.

推荐答案

有两种方法可以做到这一点:

There's two ways to do this:


  1. 如果您的索引未经优化,那么只需优化它 - 这将在整个过程中升级文件格式。

  1. if your index is unoptimized, then simply optimize it - this will upgrade the file format along the way.

如果您的索引已经过优化,则无法执行此操作。相反,使用随solr提供的命令行工具(您的路径可能与我的不同

if your index is already optimized, you can't do this. Instead, use the command line tool supplied with solr (your path may differ from mine

java -cp work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/lucene-core-3.3.0.jar org.apache.lucene.index.IndexUpgrader -verbose /path/to/index/directory


但请注意,这只会更改文件格式 - 它不会停止弃用警告,因为除非你告诉它否则,solrconfig.xml默认仍然假设您使用的是旧索引格式。请参阅 http://www.mail-archive.com/dev@lucene.apache.org/msg23233.html

However, note that this only changes the file format - it won't stop deprecation warnings because unless you tell it otherwise, solrconfig.xml defaults to still assuming you're using an old index format. see http://www.mail-archive.com/dev@lucene.apache.org/msg23233.html

你仍然可以得到日志文件中有很多这样的行:

You may still get lots of lines like this in your logfile:

WARNING: LowerCaseFilterFactory is using deprecated LUCENE_24 emulation. You should at some point declare and reindex to at least 3.0, because 2.x emulation is deprecated and will be removed in 4.0

直到告诉solrconfig.xml您已准备好使用新索引的所有功能格式。您可以通过将以下内容添加到solrconfig.xml(在顶层,就在abortOnConfigurationError设置之后)来执行此操作。

until you tell solrconfig.xml that you're ready to use all the features of the new index format. You do this by adding the following to solrconfig.xml (at the top level, just after the abortOnConfigurationError setting).

<!-- Controls what version of Lucene various components of Solr
     adhere to.  Generally, you want to use the latest version to
     get all bug fixes and improvements. It is highly recommended
     that you fully re-index after changing this setting as it can
     affect both how text is indexed and queried.
  -->
<luceneMatchVersion>LUCENE_33</luceneMatchVersion>

这篇关于将solr 1.4指数升级到solr 3.3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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