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
either.

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


Reply via email to