11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CREATE<br />

RELOAD<br />

RENAME<br />

SWAP<br />

UNLOAD<br />

MERGEINDEXES<br />

SPLIT<br />

REQUESTSTATUS<br />

STATUS<br />

The STATUS action returns the status of all running <strong>Solr</strong> cores, or status for only the named core.<br />

Input<br />

http://localhost:8983/solr/admin/cores?action=STATUS&core=core0<br />

Query Parameters<br />

Parameter Type Required Default Description<br />

core string No The name of a core, as listed in the "name" attribute of a element in solr.xml.<br />

indexInfo boolean No true If false, information about the index will not be returned with a<br />

core STATUS request. In <strong>Solr</strong> implementations with a large<br />

number of cores (i.e., more than hundreds), retrieving the index<br />

information for each core can take a lot of time and isn't always<br />

required.<br />

CREATE<br />

The CREATE action creates a new core and registers it.<br />

If a <strong>Solr</strong> core with the given name already exists, it will continue to handle requests while the new core is<br />

initializing. When the new core is ready, it will take new requests and the old core will be unloaded.<br />

http://localhost:8983/solr/admin/cores?action=CREATE&name=coreX&instanceDir=pat<br />

h/to/dir&config=config_file_name.xml&dataDir=data<br />

CREATE must be able to find a configuration!<br />

Your CREATE call must be able to find a configuration, or it will not succeed.<br />

When you are running <strong>Solr</strong>Cloud and create a new core for a collection, the configuration will be<br />

inherited from the collection – each collection is linked to a configName, which is stored in the zookeeper<br />

database. This satisfies the config requirement. There is something to note, though – if you're running<br />

<strong>Solr</strong>Cloud, you should NOT be using the CoreAdmin API at all. Use the Collections API.<br />

When you are not running <strong>Solr</strong>Cloud, if you have Config Sets defined, you can use the configSet<br />

parameter as documented below. If there are no config sets, then the instanceDir specified in the<br />

CREATE call must already exist, and it must contain a conf directory which in turn must contain solrco<br />

nfig.xml and your schema, which is usually named either managed-schema or schema.xml, as well<br />

as any files referenced by those configs. The config and schema filenames could be specified with the<br />

config and schema parameters, but these are expert options. One thing you COULD do to avoid creating<br />

the conf directory is use config and schema parameters that point at absolute paths, but this can lead to<br />

confusing configurations unless you fully understand what you are doing.<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

473

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!