You set the defaults on the "search handler", not the "search component".
See solrconfig.xml:
<requestHandler name="/select" class="solr.SearchHandler">
<!-- default values for query parameters can be specified, these
will be overridden by parameters in the request
-->
<lst name="defaults">
<str name="echoParams">explicit</str>
<int name="rows">10</int>
<str name="df">text</str>
</lst>
...
-- Jack Krupansky
-----Original Message-----
From: Jorge Luis Betancourt Gonzalez
Sent: Tuesday, September 23, 2014 11:02 AM
To: solr-user@lucene.apache.org
Subject: Changed behavior in solr 4 ??
Hi:
I’m trying to change the default configuration for the query component of a
SearchHandler, basically I want to set a default value to the rows
parameters and that this value be shared by all my SearchHandlers, as stated
on the solrconfig.xml comments, this could be accomplished redeclaring the
query search component, however this is not working on solr 4.9.0 which is
the version I’m using, this is my configuration:
<searchComponent name="query" class="solr.QueryComponent">
<lst name="defaults">
<int name="rows">1</int>
</lst>
</searchComponent>
The relevant portion of the solrconfig.xml comment is: "If you register a
searchComponent to one of the standard names, will be used instead of the
default.” so is this a new desired behavior?? although just for testing a
redefined the components of the request handler to only use the query
component and not to use all the default components, this is how it looks:
<requestHandler name="/select" class="solr.SearchHandler”>
<arr name="components">
<str>query</str>
</arr>
</requestHandler>
Everything works ok but the the rows parameter is not used, although I’m not
specifying the rows parameter on the URL.
Regards,Concurso "Mi selfie por los 5". Detalles en
http://justiciaparaloscinco.wordpress.com