lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Flacco <>
Subject solr warmup and reading the index into memory on startup?
Date Fri, 24 Feb 2012 19:59:28 GMT
I'm seeing some problems warming up solr on startup. Currently warmup
consists of two parts- running queries on startup programmatically, and
then running a script to perform queries. The programmatic warmup seems to
warm up Solr fine in terms of making queries via the Solr admin tool, but
when I do a query programmatically, the first query basically takes 2-3m,
during which time I see tons of lucene index loading activity. I'm
assuming that the lucene index is not getting loaded into memory, so this
happens on the first query.

Is there a way to force Solr to load the index into memory on startup
apart from doing a query and waiting?

Programmatic warmup:

for(a bunch of queries){
  SolrQueryResponse rsp = new SolrQueryResponse();
  core.execute(req, rsp);
  NamedList values = rsp.getValues();
  // and iterate through the docs in these values

Also tried adding a *:* query into the warmup listener- this didn't help

<listener event="firstSearcher" class="solr.FooWarmupListener">
             <str name="warmupFile">warmup_queries.txt</str>
      <arr name="queries">
<str name="q">*:*</str></lst>

View raw message