Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by ryan: http://wiki.apache.org/solr/MultiCore The comment on the change is: in progress ------------------------------------------------------------------------------ <!> ["Solr1.3"] - solr allows multiple SolrCore instances to run within the same solr instance. + [[TableOfContents]] - /!\ TODO! TODO.... + = Overview = + Solr allows multiple SolrCore instances to run within a single web-app. The cores + can be dynamically managed via the MultiCoreHandler. + + = Configuration = + + To enable multi core support, place a file named ''multicore.xml'' in the solr.home + directory. The example application ships with multicore configs, but you will + need to edit + + = Example = + + Solr ships with an example multicore setup. To run this configuration, start jetty using: + {{{ + java -Dsolr.solr.home=multicore -jar start.jar + }}} + + This will start solr running two cores: ''core0'', and ''core1''. To access each core, try: + http://localhost:8983/solr/@core0/select?q=*:* + + http://localhost:8983/solr/@core1/select?q=*:* + + + To access the admin pages for each core visit: + http://localhost:8983/solr/admin/?core=core0 + + http://localhost:8983/solr/admin/?core=core1 + + + = MultiCoreHandler = + + The MultiCoreHandler is a special SolrRequestHandler that is used to manage existing cores. + Unlike normal !SolrRequestHandlers, the !MultiCoreHandler is not attached to a core, + it is configured in multicore.xml. A single MultiCoreHandler exists for each web-app + + To enable dynamic core configuration, make sure the ''adminPath'' attribute is set in + multicore.xml. If this attribute is absent, the !MultiCoreHandler will not be avaliable. + + + == STATUS == + + Get the status for a given core or all cores if no core is specified: + + http://localhost:8983/solr/admin/multicore?action=STATUS&core=core0 + + http://localhost:8983/solr/admin/multicore?action=STATUS + + + == LOAD == + + /!\ '''not implemented yet!''' + + This will load a new core from an existing configuration. + + ?persist=true will save the changes to multicore.xml + + http://localhost:8983/solr/admin/multicore?action=LOAD&core=core0 + + == UNLOAD == + + /!\ '''not implemented yet!''' + + Remove a core from solr. Existing requests will continue to be processed, but no new + requests will be sent to this core. + + http://localhost:8983/solr/admin/multicore?action=UNLOAD&core=core0 + + + == RELOAD == + + Load a new core from the same configuration as an existing registered core. While the + "new" core is initalizing, the "old" one will continue to accept requsts. Once + it has finished, all new request will go to the "new" core, and the "old" core will + be removed. + + http://localhost:8983/solr/admin/multicore?action=RELOAD&core=core0 + + + == SETASDEFAULT == + + Change the core that is used if no core is selected in the request. + + http://localhost:8983/solr/admin/multicore?action=SETASDEFAULT&core=core1 +
