I'm trying to integrate Solr 3.6.2 to my project, which I used Maven and Tomcat to run these things up.
Everything's fine when I use HttpSolrServer, but when I changed to EmbeddedSolrServer, it gets error like this
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'
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>
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
I've tried changing it into LUCENE_35 and LUCENE_CURRENT in Solrconfig.xml but It gets another error.
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.
Please help. I'm new to this.
Linh
UPDATE:
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.
Just simple exclude the 3.5.0 and everything's fine.
Thank you! Problem solved!