0

I am trying to configure warmup queries in solrconfig.xml on Solr version 4.10.3, but no matter how we do it the cache seems to disappear after about a minute or so, and then the first search again takes about 20 secs., with subsequent searches coming straight away.

The query looks like this (filter is the variable search-term):

solr/Nyheder/select?q=overskrift:" & filter & "+OR+underrubrik:" & filter & "+OR+tekst:" & filter&fl=id+oprettet+overskrift+underrubrik+tekst+pix &sort=oprettet+desc

And the solrConfig.xml section (which seems to help nothing) looks like this (it is similar for the event="firstSearcher"):

<listener event="newSearcher" class="solr.QuerySenderListener">
  <arr name="queries">
         <lst>
    <str name="q">*:*</str>
    <str name="sort">oprettet desc</str>
    <str name="fl">id oprettet overskrift underrubrik tekst pix</str>
   </lst>
       <lst>
    <str name="q">overskrift:* OR underrubrik:* OR tekst:*</str>
    <str name="sort">oprettet desc</str>
    <str name="fl">id oprettet overskrift underrubrik tekst pix</str>
   </lst>
  </arr>
</listener>

Edit: added commit configuration

      <autoCommit> 
   <maxTime>120000</maxTime> 
   <openSearcher>true</openSearcher> 
 </autoCommit>
<autoSoftCommit> 
   <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime> 
 </autoSoftCommit>
Carsten
  • 11
  • 7

2 Answers2

0

Everytime you do a softcommit or a hard commit, your caches are more or less invalidated, since any type of commit will generally create a "newsearcher". You probably have a softcommit or hardcommit set to 1 minute.

Check this link and see the sections Soft Commits and Hard commits.

jay
  • 2,067
  • 2
  • 16
  • 31
  • I fiddled with these parameters (we are still testing) and nothing seems to change, also see comments above, but your link provided more insight into SOLr :-) – Carsten Jul 10 '15 at 12:53
  • Do u have soft commits enabled? Can u paste the relevant section of auto commit n soft commit sections? – jay Jul 10 '15 at 13:24
  • added autoCommit config to original question. No I use Hard Commits – Carsten Jul 13 '15 at 07:23
0

It turned out that this was not related to SolR at all but to internal routing. For those interested it turned out that ipv6 DNS was checked and needed to timeout before the IPv4 address was used, so the delay was from a DNS lookup+timeout and NOT from SOLr.

Carsten
  • 11
  • 7