You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by fabigol <fa...@vialtis.com> on 2015/10/15 17:53:32 UTC

Solr Migration 1.4.1 -> 5.2.1

Hi,
i catch an old project working with Solr 1.4.1, jbossPortal and java 1.5.
I try to migrate my  solr version  to solr 5.2.1 work with java 1.7.
The solr indexation works but i fail to display the new results on my
application.
I want to know if i must update the jar in my project or if the old version
client (solr-solrj) can work with my new version Solr.
How do i do?

 



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Migration-1-4-1-5-2-1-tp4234599.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Migration 1.4.1 -> 5.2.1

Posted by Erick Erickson <er...@gmail.com>.
Solr does not guarantee  backwards compatibility more than one major
version back. That is,
Solr 3.x is guaranteed to at least read Solr 1.4 indexes (there was no
Solr 2.x).
Solr 4x can read 3x but not 1.x.
Solr 5x can read 4x indexes, but not 3x

You really only have two choices here. You _could_ try to install Solr
3.x and optimize.
Then install Solr 4x and optimize. HOpefully this rewrites the entire
index to 4.x
Then install Solr 5x.

You could also try the indexupgrader tool, see:
https://lucene.apache.org/core/4_0_0/core/org/apache/lucene/index/IndexUpgrader.html.
I'm not sure how many revisions this can "reach back", I.e. if the 4.x
index upgrader
can read the 1.4, then you're pretty well set, since Solr 5 should be
able to read the 4.x
format.

But what I'd really do is just re-index the corpus if at all possible.
The index upgrade process
works reasonable well, but there will be some options that have been
added, others that have
been deprecated in terms of the schema etc.

Best,
Erick

On Thu, Oct 15, 2015 at 8:53 AM, fabigol <fa...@vialtis.com> wrote:
> Hi,
> i catch an old project working with Solr 1.4.1, jbossPortal and java 1.5.
> I try to migrate my  solr version  to solr 5.2.1 work with java 1.7.
> The solr indexation works but i fail to display the new results on my
> application.
> I want to know if i must update the jar in my project or if the old version
> client (solr-solrj) can work with my new version Solr.
> How do i do?
>
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Solr-Migration-1-4-1-5-2-1-tp4234599.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Migration 1.4.1 -> 5.2.1

Posted by Shawn Heisey <ap...@elyograg.org>.
On 10/15/2015 9:53 AM, fabigol wrote:
> i catch an old project working with Solr 1.4.1, jbossPortal and java 1.5.
> I try to migrate my  solr version  to solr 5.2.1 work with java 1.7.
> The solr indexation works but i fail to display the new results on my
> application.
> I want to know if i must update the jar in my project or if the old
version
> client (solr-solrj) can work with my new version Solr.
> How do i do?

Erick gave you information about Solr itself.  Here's some info for SolrJ:

If you want a 1.x version of SolrJ to work with Solr 3.x or later, you
must change the response parser to XML.

server.setParser(new XMLResponseParser());

https://wiki.apache.org/solr/Solrj#SolrJ.2FSolr_cross-version_compatibility

Depending on exactly how you use SolrJ, there may be other things that
need changing for compatibility, but the XML response parser will be
absolutely required.

Updating SolrJ is probably a better option, but you may need to update
your Java version too.  You will definitely need to change jars for
SolrJ dependencies.  Some code changes, such as HttpSolrServer to
HttpSolrClient, are recommended.

Thanks,
Shawn