lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject Re: Can I use SolrJ 6.3.0 to talk to a Solr 5.2.3 server?
Date Tue, 03 Jan 2017 19:30:49 GMT
On 1/3/2017 10:35 AM, Jennifer Coston wrote:
> I am running into a conflict with Solr and ElasticSearch. We are trying to add support
for Elastic Search 5.1.1 which requires Lucene 6.3.0 to an existing system that uses Solr
5.2.3. At the moment I am using SolrJ 5.3.1 to talk to the 5.2.3 Server. I was hoping I could
just update the SolrJ libraries to 6.3.0 so the Lucene conflict goes away, but when I try
to run my unit tests I'm seeing this error:

There is no 5.2.3 version of Solr.  The 5.2.x line ended with 5.2.1. 
There is a 5.3.2 version.

If you're using HttpSolrClient, mixing a 5.x server and a 6.x client
will be no problem at all.  If you're using CloudSolrClient you may run
into issues because of the very rapid pace of change in SolrCloud --
mixing major versions is not recommended.  If you're using
EmbeddedSolrServer, then the client and the server are not separate, so
upgrading both at once is probably OK, but the code and the core config
might require changes.

> java.util.ServiceConfigurationError: Cannot instantiate SPI class: org.apache.lucene.codecs.simpletext.SimpleTextPostingsFormat

This is an error from a Solr *server*, not a client.  Are you using
EmbeddedSolrServer?

> Here are the Solr Dependencies I have in my pom.xml:

You've got a solr-core dependency here.  That is not at all necessary
for a SolrJ client, *unless* you are using EmbeddedSolrServer.  If you
are using the embedded server, then things are much more complicated,
and your code may require changes before it will work correctly with a
new major version.  The embedded server is NOT recommended unless you
have no other choice.  The unit tests included with Solr are able to
fire up Solr with Jetty for tests, just like a real separate Solr
server.  Your tests can also do this.  Look for tests in the Lucene/Solr
codebase that extend SolrJettyTestBase, and use those as a guide.

Thanks,
Shawn


Mime
View raw message