Default result rows

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Default result rows

mike a.-2
Hi!

Where can I define, how many rows must be returned in the result?
Default is 10, and specifying other value each time through URL or
advanced interface isn't comfortable.
 Ar cieņu, Mihails
Reply | Threaded
Open this post in threaded view
|

Re: Default result rows

Shalin Shekhar Mangar
You can configure this in solrconfig.xml under the "defaults" section for
StandardRequestHandler

<requestHandler name="standard" class="solr.StandardRequestHandler"
default="true">
    <!-- default values for query parameters -->
     <lst name="defaults">
       <str name="echoParams">explicit</str>
       <int name="rows">30</int>
       <str name="fl">*</str>
       <str name="version">2.1</str>
     </lst>
  </requestHandler>

2008/6/18 Mihails Agafonovs <[hidden email]>:

> Hi!
>
> Where can I define, how many rows must be returned in the result?
> Default is 10, and specifying other value each time through URL or
> advanced interface isn't comfortable.
>  Ar cieņu, Mihails




--
Regards,
Shalin Shekhar Mangar.
Reply | Threaded
Open this post in threaded view
|

Re: Default result rows

mike a.-2
Doesn't work :(. None of the parameters in the "defaults" section is
being read. Solr still uses the predefined default parameters.

P.S. In "defaults" section I should be able specify also what
stylesheet to use, right?
 Quoting Shalin Shekhar Mangar : You can configure this in
solrconfig.xml under the &quot;defaults&quot; section for
 StandardRequestHandler
 &lt;requestHandler name=&quot;standard&quot;
class=&quot;solr.StandardRequestHandler&quot;
 default=&quot;true&quot;&gt;
 &lt;!-- default values for query parameters --&gt;
 &lt;lst name=&quot;defaults&quot;&gt;
 &lt;str name=&quot;echoParams&quot;&gt;explicit&lt;/str&gt;
 &lt;int name=&quot;rows&quot;&gt;30&lt;/int&gt;
 &lt;str name=&quot;fl&quot;&gt;*&lt;/str&gt;
 &lt;str name=&quot;version&quot;&gt;2.1&lt;/str&gt;
 &lt;/lst&gt;
 &lt;/requestHandler&gt;
 2008/6/18 Mihails Agafonovs &lt;[hidden email]&gt;:
 &gt; Hi!
 &gt;
 &gt; Where can I define, how many rows must be returned in the
result?
 &gt; Default is 10, and specifying other value each time through URL
or
 &gt; advanced interface isn't comfortable.
 &gt;  Ar cie&#326;u, Mihails
 --
 Regards,
 Shalin Shekhar Mangar.
 Ar cieņu, Mihails

Links:
------
[1] mailto:[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Default result rows

Otis Gospodnetic-2
In reply to this post by mike a.-2
Use &rows=NNN in the URL.


Otis --
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch


----- Original Message ----

> From: Mihails Agafonovs <[hidden email]>
> To: [hidden email]
> Sent: Wednesday, June 18, 2008 4:30:53 AM
> Subject: Default result rows
>
> Hi!
>
> Where can I define, how many rows must be returned in the result?
> Default is 10, and specifying other value each time through URL or
> advanced interface isn't comfortable.
> Ar cieņu, Mihails

Reply | Threaded
Open this post in threaded view
|

Re: Default result rows

Yonik Seeley-2
In reply to this post by mike a.-2
2008/6/18 Mihails Agafonovs <[hidden email]>:
> Doesn't work :(. None of the parameters in the "defaults" section is
> being read.

Everyone uses this functionality, so it's a bug in your request or
config somewhere.
- Make sure you restarted Solr after changing solrconfig.xml
- Make sure you changed the defaults in the right request handler
- Add echoParams=all to your request to see what parameters are being used
- if you can't get it to work, post the URL of the query you are using
to test, the response output, and the relevant part of the
solrconfig.xml

-Yonik
Reply | Threaded
Open this post in threaded view
|

Re: Default result rows

mike a.-2
The "problem" was in the search query submit form, where rows value
was defined as 10.
 Quoting Yonik Seeley : 2008/6/18 Mihails Agafonovs
&lt;[hidden email]&gt;:
 &gt; Doesn't work :(. None of the parameters in the
&quot;defaults&quot; section is
 &gt; being read.
 Everyone uses this functionality, so it's a bug in your request or
 config somewhere.
 - Make sure you restarted Solr after changing solrconfig.xml
 - Make sure you changed the defaults in the right request handler
 - Add echoParams=all to your request to see what parameters are
being used
 - if you can't get it to work, post the URL of the query you are
using
 to test, the response output, and the relevant part of the
 solrconfig.xml
 -Yonik
 Ar cieņu, Mihails

Links:
------
[1] mailto:[hidden email]