Tam*_*ser 7 indexing solr luke
我有一个使用apache solr 1.4的现有索引构建.
我想在版本3.3中使用此现有索引.如您所知,索引格式在3.x之后更改,那么如何才能执行此操作?
我使用Luke to XML导出了现有索引(即1.4版本).
小智 7
有两种方法可以做到这一点:
如果您的索引未经优化,那么只需优化它 - 这将在整个过程中升级文件格式.
如果您的索引已经优化,则无法执行此操作.相反,使用solr提供的命令行工具(您的路径可能与我的路径不同
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
Run Code Online (Sandbox Code Playgroud)但请注意,这只会更改文件格式 - 它不会停止弃用警告,因为除非您另外说明,否则solrconfig.xml默认仍假设您使用的是旧索引格式.请参阅http://www.mail-archive.com/dev@lucene.apache.org/msg23233.html
您可能仍然在日志文件中获得了许多这样的行:
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
Run Code Online (Sandbox Code Playgroud)
直到告诉solrconfig.xml您已准备好使用新索引格式的所有功能.您可以通过将以下内容添加到solrconfig.xml(在顶层,就在abortOnConfigurationError设置之后)来完成此操作.
<!-- 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>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3192 次 |
最近记录: |