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.

Configuration<br />

Configuring solrconfig.xml<br />

The Data Import Handler has to be registered in<br />

solrconfig.xml. For example:<br />

<br />

<br />

/path/to/my/DIHconfigfile.xml<br />

<br />

<br />

The only required parameter is the config parameter, which specifies the location of the DIH configuration file<br />

that contains specifications for the data source, how to fetch data, what data to fetch, and how to process it to<br />

generate the <strong>Solr</strong> documents to be posted to the index.<br />

You can have multiple DIH configuration files. Each file would require a separate definition in the solrconfig.<br />

xml file, specifying a path to the file.<br />

Configuring the DIH Configuration File<br />

An annotated configuration file, based on the " db" collection in the dih example server, is shown below ( exampl<br />

e/example-DIH/solr/db/conf/db-data-config.xml). It extracts fields from the four tables defining a<br />

simple product database, with this schema. More information about the parameters and options shown here are<br />

described in the sections following.<br />

<br />

<br />

<br />

<br />

<br />

<br />

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

207

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

Saved successfully!

Ooh no, something went wrong!