I'm not entirely sure about this, but I think you're mixing up
useParams and initParams.

If I'm reading the docs correctly, useParams is used in conjunction
with the "Request
Parameters API" and whatever you're setting is stored in a separate
file (params.json),
not solrconfig.xml.

This is separate from the initParams which is all internal to
solroconfig.xml. I _think_
you'll be fine if you substitute "initParams" for "useParms" in your
requestHandler definition.

WARNING: This isn't really code I've used much, so this may be totally off base.


On Tue, Sep 20, 2016 at 8:17 AM, Matt Work Coarr
<mattcoarr.w...@gmail.com> wrote:
> Good morning. I'm attempting to set some default query parameters via
> solrconfig.xml but they are not taking effect.  I'm using the /browse
> interface (e.g. velocity templates).
> To keep it simple, let's start with "fl".  When I specify fl as a url
> parameter, it does take effect.  But when I put it in solrconfig.xml, it's
> not being used.
> Right now, I'm putting this in a new init params element:
> <initParams name="myParams">
>   <lst name="defaults">
>     <str name="fl">field1,field2,field3</str>
>   </lst>
> </initParams>
> Then I tell the /browse request handler to add it to the list of useParams
> (I've tried the beginning and end of the list):
> <requestHandler name="/browse" class="solr.SearchHandler"
> useParams="query,facets,velocity,browse,myParams">
> I have also tried adding "useParams=myParams" in the url.
> FYI, I have been including wt=xml in my url so that I eliminate the
> possibility that the velocity templates are causing a problem.
> Any ideas?
> Thanks!
> Matt

Reply via email to