On 3/28/2018 1:16 AM, Mugdha Varadkar wrote:
I am trying to restore Solr 5.5.5 indexes into Solr 7.2.1
Performed below steps:
1. Upgraded the indexes to Solr 6.6.2 indexes using IndexUpgraded Tool
<https://lucene.apache.org/solr/guide/7_0/indexupgrader-tool.html#indexupgrader-tool>
Command used : java -cp
server/solr-webapp/webapp/WEB-INF/lib/lucene-core-6.6.2.jar:server/solr-webapp/webapp/WEB-INF/lib/lucene-backward-codecs-6.6.2.jar
org.apache.lucene.index.IndexUpgrader -verbose
/usr/local/solr_5_5_data/index/
2. Deleted the old collection used previously, as there is a change in
schema file.
3. Created new collection for new schema. Keeping the replication and
shards same as old collection.
4. Now there is data going into new collection.
5. Then I restore the upgraded indexes using replication API.(As the
backup was taken using that.)
6. The indexes got restored but the new data created after new
collection creation was not available.
What you said has implied that the index has multiple shards. If that
is the case, is the collection using the compositeId router? If so, are
you 100 percent sure that the new collection has the same hash ranges
for the shards that were in the collection built by the old version?
You would need to look at the information in zookeeper for both versions.
For step 6, exactly what was not available? The wording is a little bit
vague.
If you changed the schema, then you're almost certainly going to need to
rebuild the index from scratch. Depending on exactly what you changed,
Solr probably can't read an index built with one schema if a different
schema is used.
This is why I strongly recommend building indexes from scratch when
upgrading Solr.
Thanks,
Shawn