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.

{<br />

}<br />

"add-requesthandler":{<br />

"name":"/query",<br />

"class":"solr.SearchHandler",<br />

"defaults":{<br />

"echoParams":"explicit",<br />

"wt":"json",<br />

"indent":true<br />

}<br />

}<br />

A searchComponent in solrconfig.xml<br />

looks like this:<br />

<br />

string<br />

elevate.xml<br />

<br />

And the same searchComponent with the Config API:<br />

{<br />

}<br />

"add-searchcomponent":{<br />

"name":"elevator",<br />

"class":"QueryElevationComponent",<br />

"queryFieldType":"string",<br />

"config-file":"elevate.xml"<br />

}<br />

Set autoCommit properties in solrconfig.xml:<br />

<br />

15000<br />

false<br />

<br />

Define the same properties with the Config API:<br />

{<br />

}<br />

"set-property": {<br />

"updateHandler.autoCommit.maxTime":15000,<br />

"updateHandler.autoCommit.openSearcher":false<br />

}<br />

Name Components for the Config API<br />

The Config API always allows changing the configuration of any component by name. However, some<br />

configurations such as listener or initParams do not require a name in solrconfig.xml. In order to be<br />

able to update and delete of the same item in configoverlay.json, the name attribute becomes<br />

mandatory.<br />

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

486

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

Saved successfully!

Ooh no, something went wrong!