solrsolrconfig

where to set default solr query parameters for all requests


I am still new to Solr. I am trying to find a place where I can put default query parameters.

I know I can set default query parameters in places such as <requestHandler name="/select" class="solr.SearchHandler"> , <requestHandler name="/query" class="solr.SearchHandler"> , and <requestHandler name="/browse" class="solr.SearchHandler">.

But what I really want is to set default query parameters for all the above three (or more) sections.

Example default parameters:

<str name="defType">edismax</str> <str name="qf"> id^2.5 name^2 </str>

Where should I place the above lines in `solrconfig.xml'


Solution

  • In the latest Solr, you would use initParams section for that. The examples shipped with Solr demonstrate it.