On 3/28/2016 12:54 AM, scott.chu wrote:
> I have old schema.xml and solrconfig.xml from Solr 3.5. I want to rebuild the 
> core structure in Solr 5.5. I got some questions to request for answer or 
> suggestions:
>
> 1. Can I just put these 2 old xmls into the config folder and issue 
> 'bin\solr.cmd -c corename -d config folder path' to build a Solr 5.5 core? If 
> not, what modification should I make?
>     (Note: AFAIK, MainIndex and IndexDefaults are replaced IndexConfig and no 
> long exist in new solrconfig.xml. Besides, there're no any schema.xmls in 
> Solr 5.5's examples.)

Solr 5.5 is capable of using schema.xml, but every 5.5 example was
changed to use the Managed schema factory instead of the Classic.  In
earlier versions, at least one one of the example configsets used the
Classic schema.

Most likely a 3.5 config will *not* work as-is in any 5.x version. 
There have simply been too many changes from two major releases and a
LOT of minor releases.

When the version jump is small and doesn't include a major release,
upgrading and using your existing config is usually no big deal.  With a
jump from 3.5 to 5.5, the best option is to start with a 5.5 example and
modify it (using 5.5 options, not 3.5) until it does what you need. 
This will mean adding the replication configuration and anything else
that's custom in the 3.5 config.  You may need to compare the
collection1 example config from 3.5 to the configsets in 5.5 to get an
idea of what's changed.

Something else to consider is starting with 5.4.1 instead of 5.5. 
Between the managed-schema changes and a handful of bugs in 5.5, the
techproducts-sample-configs configset found in 5.4.1 will probably work
better for you, and that config will probably work well through the
first few releases in 6.x with only *minor* changes.

> 2. What should I put in that config folder? Are they same as in Solr 3.5's?

It needs solrconfig.xml and a schema file whose name may be controlled
by solrconfig.xml.  Also add any support files referenced by either of
those files.  Support files can include one or more DIH configs,
synonyms, stopwords, etc.

> 3. Is there any special rules where I put the config folder? For example, Do 
> I have to put that folder under solr-5.5.0\server\solr\configsets? Is this 
> path must be relative to Solr home folder?

For the most part, data under configsets is used when creating a new
core with the "bin/solr create" command.  The configset will be copied
to the correct location (either core/conf or zookeeper) when creating a
new core/collection.  There is a non-cloud feature called configsets
which actually does use/share the configset files directly, but this
feature has some quirks and some things may not work as expected.

> 4. If the core is created ok, where is the the core folder that Solr has 
> built?

I'm assuming that you're talking about using the "bin/solr create"
command.  This will create a new core instanceDir in the solr home. 
Where this lives will depend on how you've started Solr, and whether you
used the service install script for Linux/UNIX platforms.

> 5. Is creating core with schema.xml achievable via admin UI?

This is a difficult question to answer, because creating cores with the
CoreAdmin section of the UI usually doesn't work the way people expect
it to.  If you're running SolrCloud, the CoreAdmin feature should not be
used at all.  With SolrCloud, you can definitely create new collections
without touching the filesystem directly, using the Collections API.

Thanks,
Shawn

Reply via email to