无效的luceneMatchVersion'LUCENE_36' [英] Invalid luceneMatchVersion 'LUCENE_36'

查看:290
本文介绍了无效的luceneMatchVersion'LUCENE_36'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Solr 3.6.2集成到我的项目中,我使用Maven和Tomcat来运行这些东西.

I'm trying to integrate Solr 3.6.2 to my project, which I used Maven and Tomcat to run these things up.

当我使用HttpSolrServer时一切都很好,但是当我更改为EmbeddedSolrServer时,会出现这样的错误

Everything's fine when I use HttpSolrServer, but when I changed to EmbeddedSolrServer, it gets error like this

错误:org.apache.solr.core.CoreContainer-org.apache.solr.common.SolrException:无效的luceneMatchVersion'LUCENE_36',有效值为:[LUCENE_20,LUCENE_21,LUCENE_22,LUCENE_23,LUCENE_24,LUCENE_29, LUCENE_31,LUCENE_32,LUCENE_33,LUCENE_34,LUCENE_35,LUCENE_CURRENT]或格式为"V.V"的字符串

ERROR: org.apache.solr.core.CoreContainer - org.apache.solr.common.SolrException: Invalid luceneMatchVersion 'LUCENE_36', valid values are: [LUCENE_20, LUCENE_21, LUCENE_22, LUCENE_23, LUCENE_24, LUCENE_29, LUCENE_30, LUCENE_31, LUCENE_32, LUCENE_33, LUCENE_34, LUCENE_35, LUCENE_CURRENT] or a string in format 'V.V'

我已经像这样添加到Maven依赖项中

I've added into Maven dependencies like this

 <dependency>
           <artifactId>solr-solrj</artifactId>
           <groupId>org.apache.solr</groupId>
           <version>3.6.2</version>
           <type>jar</type>
           <scope>compile</scope>
  </dependency>
   <dependency>
           <artifactId>solr-core</artifactId>
           <groupId>org.apache.solr</groupId>
           <version>3.6.2</version>
           <type>jar</type>
           <scope>compile</scope>
    </dependency>

当我检查构建路径"并转到库"时,Maven似乎自动下载了此文件:

And when I check the Build Path and go to the Libraries, It seems the Maven automatically downloaded this:

lucene-core-3.5.0.jar

lucene-core-3.5.0.jar

我曾尝试在Solrconfig.xml中将其更改为LUCENE_35和LUCENE_CURRENT,但它又出现了另一个错误.

I've tried changing it into LUCENE_35 and LUCENE_CURRENT in Solrconfig.xml but It gets another error.

安装文件中似乎已经硬编码了一些内容,它自动下载了3.5而不是3.6.2.但是当我检查其他模块(例如solr-core或lucene-misc,lucene-phonetic等)时,它们仍然是3.6.2,但只有Lucene-core.

It seems something has been hard-coded in the install file and it automatically downloaded the 3.5 instead of 3.6.2. But when I check other modules like solr-core or lucene-misc, lucene-phonetic etc... they are still 3.6.2, but only the lucene-core.

请帮助.我是新来的.

更新:

该项目的另一部分是在进入Solr阶段之前提供lucene-core-3.5.0.jar.因此,依赖项层次结构将发生冲突,它将改为使用3.5.0,这就是为什么它会自动下载它的原因.

There is another part of the project which is providing the lucene-core-3.5.0.jar before it gets into the Solr phase. So the dependency hierarchy will get conflict and it will used the 3.5.0 instead, that's why it automatically downloads that.

简单地排除3.5.0,一切都很好.

Just simple exclude the 3.5.0 and everything's fine.

谢谢!问题解决了!

推荐答案

solrconfig.xml更改为"LUCENE_CURRENT"可能是正确的选择.

Changing solrconfig.xml to "LUCENE_CURRENT" is probably the right thing to do.

这篇关于无效的luceneMatchVersion'LUCENE_36'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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