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.

curl http://localhost:8983/solr/techproducts/config/params<br />

#Or use the params name<br />

curl http://localhost:8983/solr/techproducts/config/params/myQueries<br />

The useParams Parameter<br />

When making a request, the useParams parameter applies the request parameters set to the request. This is<br />

translated at request time to the actual params.<br />

For example (using the names we set up in the earlier example, please replace with your own name):<br />

http://localhost/solr/techproducts/select?useParams=myQueries<br />

It is possible to pass more than one parameter set in the same request. For example:<br />

http://localhost/solr/techproducts/select?useParams=myFacets,myQueries<br />

In the above example the param set 'myQueries' is applied on top of 'myFacets'. So, values in 'myQueries'<br />

take precedence over values in 'myFacets'. Additionally, any values passed in the request take precedence over<br />

'useParams' params. This acts like the "defaults" specified in the ' ' definition in solrconfi<br />

g.xml.<br />

The parameter sets can be used directly in a request handler definition as follows. Please note that the<br />

'useParams' specified is always applied even if the request contains useParams.<br />

<br />

<br />

true<br />

false<br />

<br />

<br />

terms<br />

<br />

<br />

To summarize, parameters are applied in this order:<br />

parameters defined in in solrconfig.xml.<br />

parameters applied in _invariants_ in params.json and that is specified in the requesthandler definition or<br />

even in request<br />

parameters defined in the request directly.<br />

parameter sets defined in the request, in the order they have been listed with useParams.<br />

parameter sets defined in params.json that have been defined in the request handler.<br />

parameters defined in in solrconfig.xml.<br />

Public APIs<br />

The RequestParams Object can be accessed using the method <strong>Solr</strong>Config#getRequestParams() . Each<br />

paramset can be accessed by their name using the method RequestParams#getRequestParams(String<br />

name).<br />

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

492

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

Saved successfully!

Ooh no, something went wrong!