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 mganeshs <mg...@live.in> on 2017/05/26 08:20:44 UTC

Data from 4.10 to 6.5.1

Hi,
 
I am planning the following for moving my old solr index data created in
4.10 to new solr server with 6.5.1. Let me know whether it will work out or
not.

* Setup Solr and Collections with version 5.5
* Copy data folder ( in old solr server 4.10 ) to the corresponding
collection's data folder
* Optmize the collection
* Now setup new solr and collections with version 6.5.1
* Copy the data folder of corresponding collections in 5.5 server ( which
got optmised ) to data folder in 6.5.1 server

Will this be suffice ? 

Let us know your opinions.
Early responses will be very much appreciated.




--
View this message in context: http://lucene.472066.n3.nabble.com/Data-from-4-10-to-6-5-1-tp4337410.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Data from 4.10 to 6.5.1

Posted by Rick Leir <rl...@leirtech.com>.
There have been many changes since 4.10. I would suggest that you 
re-index or jump through high hoops. First, compare solrconfig.xml with 
the new default and have a look at schema.xml.


On 2017-05-26 04:20 AM, mganeshs wrote:
> Hi,
>   
> I am planning the following for moving my old solr index data created in
> 4.10 to new solr server with 6.5.1. Let me know whether it will work out or
> not.
>
> * Setup Solr and Collections with version 5.5
> * Copy data folder ( in old solr server 4.10 ) to the corresponding
> collection's data folder
> * Optmize the collection
> * Now setup new solr and collections with version 6.5.1
> * Copy the data folder of corresponding collections in 5.5 server ( which
> got optmised ) to data folder in 6.5.1 server
>
> Will this be suffice ?
>
> Let us know your opinions.
> Early responses will be very much appreciated.
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Data-from-4-10-to-6-5-1-tp4337410.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Data from 4.10 to 6.5.1

Posted by mganeshs <mg...@live.in>.
All,

As I mentioned above, thought  I will update on steps we followed to move my
data from 4.10 to 6.5.1

Our setup has 6 collections containing only one shard in each and couple of
replicas in each collections

* Install Solr 5.5.4
* Create configs for each collection. Copied basic_configs ( thats comes by
default )
* In Manage schema add our custom field types needed for that corresponding
collection
* Start Solr in cloud mode
* Upconfig the configs for all collections
* Creating Collection with numShards as 1 using HTTP command as mentioned in
over  here
<https://cwiki.apache.org/confluence/display/solr/Collections+API>  
* Stop the solr
* In the created shards's data directory, delete the index folder and copy
the 4.10 index folder and make sure write.lock is deleted if exists.
* Now start the solr again. In the solr admin UI, we can see the num docs
will be as per your data copied from 4.10 version. 
* Optimize the index
* Do this for all collection.

Now Install 6.5.1 and repeat same above steps. 

* Install Solr 6.5.1
* Create configs for each collection. Copied basic_configs ( thats comes by
default )
* In Manage schema add our custom field types needed for that corresponding
collection
* Start Solr in cloud mode
* Upconfig the configs for all collections
* Creating Collection with numShards as 1 using HTTP command as mentioned in
over  here
<https://cwiki.apache.org/confluence/display/solr/Collections+API>  
* Stop the solr
* In the created shards's data directory, delete the index folder and copy
the 5.5.4 index folder and make sure write.lock is deleted if exists.
* Now start the solr again. In the solr admin UI, we can see the num docs
will be as per your data copied from 5.5.4  version. 
* Do this for all collection.

Now we can create REPLICA as per our need for each collection your
ADDREPLICA command.

This worked fine for us without any issues.

Hope this helps for others who wants to move from older version of SOLR 4.x
to 6.X.

Thanks and regards,



--
View this message in context: http://lucene.472066.n3.nabble.com/Data-from-4-10-to-6-5-1-tp4337410p4338133.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Data from 4.10 to 6.5.1

Posted by mganeshs <mg...@live.in>.
Thanks for the reply. Sure will pay attention. 

Indeed our approach was also to use the latest managed schema and configs
only and add our custom schema from the old version. Luckily we have only
one shard of data and others are replica only and also we are not using any
fields types ( pint, plong etc ) which are all deprecated in new version. So
I guess we are in safer side. Will keep you posted on the results.



--
View this message in context: http://lucene.472066.n3.nabble.com/Data-from-4-10-to-6-5-1-tp4337410p4337852.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Data from 4.10 to 6.5.1

Posted by Erick Erickson <er...@gmail.com>.
And please _really_ pay attention to Rick's comment about
examining your solrconfig.xml and schema file. I strongly
recommend that you do _not_ just copy them, but take the
base files distributed with 6.5.1 and move any field definitions
and/or changes to them rather than start with your current
configs.

Best,
Erick

On Fri, May 26, 2017 at 7:01 AM, Shawn Heisey <ap...@elyograg.org> wrote:
> On 5/26/2017 2:20 AM, mganeshs wrote:
>> I am planning the following for moving my old solr index data created in
>> 4.10 to new solr server with 6.5.1. Let me know whether it will work out or
>> not.
>>
>> * Setup Solr and Collections with version 5.5
>> * Copy data folder ( in old solr server 4.10 ) to the corresponding
>> collection's data folder
>> * Optmize the collection
>> * Now setup new solr and collections with version 6.5.1
>> * Copy the data folder of corresponding collections in 5.5 server ( which
>> got optmised ) to data folder in 6.5.1 server
>
> The fact that you're using "collection" to describe this suggests that
> you're running in cloud mode.  If you are, and the collections are
> sharded with the compositeId router, then you must be very careful to
> make sure that the hash ranges match.  Bad things will start to happen
> with indexing if they don't match.  If you're not running cloud, or have
> indexes with only one shard, then you're good to go.  You may find that
> you need to manually edit hash ranges in zookeeper and restart all the
> new Solr instances.
>
> Generally speaking, if you upgrade to 5.5 and optimize like you're
> describing, everything will work.
>
> By using the IndexUpgrader from a Solr 5.5.4 download, you could upgrade
> the index to a format that 6.5.1 can read, and skip the intermediate
> upgrade.  The statement about hash ranges would still apply, though.
>
> https://cwiki.apache.org/confluence/display/solr/IndexUpgrader+Tool
>
> I am assuming here that your 4.10 servers are using a schema that is
> compatible with 6.5.1 without change.  If you have to change the schema,
> chances are goood that you're going to have to completely reindex anyway.
>
> Thanks,
> Shawn
>

Re: Data from 4.10 to 6.5.1

Posted by Shawn Heisey <ap...@elyograg.org>.
On 5/26/2017 2:20 AM, mganeshs wrote:
> I am planning the following for moving my old solr index data created in
> 4.10 to new solr server with 6.5.1. Let me know whether it will work out or
> not.
>
> * Setup Solr and Collections with version 5.5
> * Copy data folder ( in old solr server 4.10 ) to the corresponding
> collection's data folder
> * Optmize the collection
> * Now setup new solr and collections with version 6.5.1
> * Copy the data folder of corresponding collections in 5.5 server ( which
> got optmised ) to data folder in 6.5.1 server

The fact that you're using "collection" to describe this suggests that
you're running in cloud mode.  If you are, and the collections are
sharded with the compositeId router, then you must be very careful to
make sure that the hash ranges match.  Bad things will start to happen
with indexing if they don't match.  If you're not running cloud, or have
indexes with only one shard, then you're good to go.  You may find that
you need to manually edit hash ranges in zookeeper and restart all the
new Solr instances.

Generally speaking, if you upgrade to 5.5 and optimize like you're
describing, everything will work.

By using the IndexUpgrader from a Solr 5.5.4 download, you could upgrade
the index to a format that 6.5.1 can read, and skip the intermediate
upgrade.  The statement about hash ranges would still apply, though.

https://cwiki.apache.org/confluence/display/solr/IndexUpgrader+Tool

I am assuming here that your 4.10 servers are using a schema that is
compatible with 6.5.1 without change.  If you have to change the schema,
chances are goood that you're going to have to completely reindex anyway.

Thanks,
Shawn