11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<br />

<br />

Datasources can still be specified in solrconfig.xml. These must be specified in the defaults section of the<br />

handler in solrconfig.xml. However, these are not parsed until the main configuration is loaded.<br />

The entire configuration itself can be passed as a request parameter using the dataConfig parameter rather<br />

than using a file. When configuration errors are encountered, the error message is returned in XML format.<br />

A reload-config command is also supported, which is useful for validating a new configuration file, or if you<br />

want to specify a file, load it, and not have it reloaded again on import. If there is an xml mistake in the<br />

configuration a user-friendly message is returned in xml format. You can then fix the problem and do a reloadconfig.<br />

You can also view the DIH configuration in the <strong>Solr</strong> Admin UI and there is an interface to import content.<br />

Request Parameters<br />

Request parameters can be substituted in configuration with placeholder ${dataimporter.request.paramn<br />

ame}.<br />

<br />

Then, these parameters can be passed to the full-import command or defined in the section in sol<br />

rconfig.xml. This example shows the parameters with the full-import command:<br />

dataimport?command=full-import&jdbcurl=jdbc:hsqldb:./example-DIH/hsqldb/ex&jdbcuse<br />

r=sa&jdbcpassword=secret<br />

Data Import Handler Commands<br />

DIH commands are sent to <strong>Solr</strong> via an HTTP request. The following operations are supported.<br />

Command<br />

abort<br />

delta-import<br />

Description<br />

Aborts an ongoing operation. The URL is http://:/ solr/ / dataimport? command=abort.<br />

For incremental imports and change detection. The command is of the form http://:/ solr/ / dataimport? command=delta-impor<br />

t. It supports the same clean, commit, optimize and debug parameters as full-import<br />

command. Only the SqlEntityProcessor supports delta imports.<br />

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

209

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

Saved successfully!

Ooh no, something went wrong!