将solr 1.4索引升级到solr 3.3?
我有一个使用 apache solr 1.4 构建的现有索引。
我想在 3.3 版本中使用这个现有索引。正如您所知,索引格式在 3.x 之后发生了变化,那么如何才能做到这一点呢?
我已经使用 Luke 将现有索引(即 1.4 版本)导出为 XML。
I have an existing index build using apache solr 1.4.
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?
I have exported the existing index (that is in 1.4 version) using Luke to XML.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有两种方法可以做到这一点:
如果您的索引未优化,则只需对其进行优化 - 这将同时升级文件格式。
如果您的索引已经优化,则无法执行此操作。相反,使用 solr 提供的命令行工具(您的路径可能与我的不同
但是,请注意,这只会更改文件格式 - 它不会停止弃用警告,因为除非您另有说明,否则 solrconfig.xml 默认仍然假设您正在使用旧的索引格式。请参阅 http://www.mail-archive.com/[电子邮件受保护]/msg23233.html
你可能仍然会得到很多像这样的行在您的日志文件中:
直到您告诉 solrconfig.xml 您已准备好使用新索引格式的所有功能,您可以通过将以下内容添加到 solrconfig.xml (在顶层,就在 abortOnConfigurationError 设置之后)来完成此操作。 。
There's two ways to do this:
if your index is unoptimized, then simply optimize it - this will upgrade the file format along the way.
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
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/[email protected]/msg23233.html
You may still get lots of lines like this in your logfile:
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).
如果你有数据:最好的方法是索引 solr 3.3 中的所有新数据
您可以使用数据导入处理程序来索引导出的 XML 文件。
如果建立新索引不适合您,那么您有不同的可能性:
据我所知,Solr 3.3 可以读取旧索引。
因此,一种想法可能是使用分片。一个分片用于旧数据(只读),另一个分片用于新数据。不幸的是,在此解决方案中您将无法修改旧数据。
If you have the data: the best way is indexing all the data new in solr 3.3
You can use the data import handler to index your exported XML files.
If building up a new index is not an solution for you, you have got different possibilities:
As far as i know, Solr 3.3 can read old indexes.
So one idea could be using shards. One shard for the old data (read only) an the other shard for the new data. Unfortunately, in this solution you will be unable to modify old data.