On Nov 19, 2011, at 4:19 AM, mechravi25 wrote:

> Hi,
> 
> When we pass the terms.limit parameter to the master (which has many shard
> cores), it's not getting pushed down to the individual cores. Instead the
> default value of -1 is assigned to Terms.limit parameter is assigned in the
> underlying shard cores. The issue being the time taken by the Master core to
> return the required limit of terms is higher when we are having more number
> of underlying shard cores. This affects the performances of the auto suggest
> feature. 
> 
> *Is there any way that we can explicitly override the default value -1 being
> set to Terms.limit in shards core.*
Yuck. Maybe you should make a JIRA issue to allow control of this? If you don't 
want perfect results and this is too slow, seems it would be nice to be able to 
specify different values here: one for the total returned, and one for the 
limit used on shards. You do have to keep in mind that results will become 
imperfect depending on the limit used.

As a workaround, you can set the terms.limit as an invariant on your /terms 
request handler at each shard - this will force the limit to n, regardless of 
what the request asks for at each shard:

 <requestHandler name="/terms" 
class="org.apache.solr.handler.component.SearchHandler">
   <lst name="invariants">
     <int name="terms.limit">n</int>
   </lst> 
   <arr name="components"> 
     <str>termsComp</str> 
   </arr> 
 </requestHandler>

- Mark Miller
lucidimagination.com



Reply via email to