[ https://issues.apache.org/jira/browse/SOLR-2430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007457#comment-13007457 ]
bidorbuy commented on SOLR-2430: -------------------------------- I don't think this is necessary as solr.xml has persistent=true set. Before the swap the admin interface shows: cwd=/home/prodza/jetty SolrHome=/home/prodza/solr/conf/primary/ and the solr.xml looks like this: -rw-rw-r-- 1 prodza prodza 348 Mar 11 22:19 solr.xml [prodza@localhost solr]$ cat solr.xml <?xml version="1.0" encoding="UTF-8" ?> <solr sharedLib="lib" persistent="true"> <cores adminPath="/admin/cores" shareSchema="true" defaultCoreName="primary"> <core name="primary" instanceDir="conf/primary/" dataDir="../../data/primary"/> <core name="staging" instanceDir="conf/staging/" dataDir="../../data/staging"/> </cores> </solr> After the swap (from primary to staging) via: http://MYHOST:8983/solr/admin/cores?action=SWAP&core=primary&other=staging the admin-interface shows: cwd=/home/prodza/jetty SolrHome=/home/prodza/solr/conf/staging/ The solr.xml has been updated (see filestamp): -rw-rw-r-- 1 prodza prodza 348 Mar 11 22:26 solr.xml [prodza@localhost solr]$ cat solr.xml <?xml version="1.0" encoding="UTF-8" ?> <solr sharedLib="lib" persistent="true"> <cores adminPath="/admin/cores" shareSchema="true" defaultCoreName="primary"> <core name="primary" instanceDir="conf/staging/" dataDir="../../data/staging"/> <core name="staging" instanceDir="conf/primary/" dataDir="../../data/primary"/> </cores> </solr> And the solr-log shows: 2011-03-11 22:26:11,421 INFO [solr.core.CoreContainer] [qtp2026549-22] : swaped: with staging 2011-03-11 22:26:11,421 INFO [solr.core.CoreContainer] [qtp2026549-22] : Persisting cores config to /home/prodza/solr/solr.xml > Swapping cores with persistent switched on should save swapped core to > defaultCoreName > -------------------------------------------------------------------------------------- > > Key: SOLR-2430 > URL: https://issues.apache.org/jira/browse/SOLR-2430 > Project: Solr > Issue Type: Bug > Components: multicore > Affects Versions: 4.0 > Environment: CentOS > Reporter: bidorbuy > Labels: core, multicore > > Running on the latest trunk version and configured multi-cores with > persistent turned on and set a default-core. When swapping cores I would have > expected default behavior to be that the swapped core name would be persisted > as the new defaultCoreName. i.e. if switching from primary to staging, the > defaultCoreName should be written to "staging". > When swapping out cores (i.e. from primary to staging) and then restarting > Jetty, Solr falls back to the current configured default-core (=primary) > instead of the previously swapped one (=staging). If this is intended, can > perhaps the swap command be extended to force rewritting Solr.xml > Current config file: > <?xml version="1.0" encoding="UTF-8" ?> > <solr sharedLib="lib" persistent="true"> > <cores adminPath="/admin/cores" shareSchema="true" > defaultCoreName="primary"> > <core name="primary" instanceDir="conf/primary/" > dataDir="../../data/primary"/> > <core name="staging" instanceDir="conf/staging/" > dataDir="../../data/staging"/> > </cores> > </solr> -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org