解决solr节点启动时,由于查询量过大,产生几秒钟超时访问问题

在solrconfig.xml设置,添加一条自己的查询预热即可

  <listener event="firstSearcher" class="solr.QuerySenderListener">

      <arr name="queries">

         <lst>

        <str name="topwords">销售</str>

        <str name="user_id">41955297</str>

        <str name="res_level">2</str>

        <str name="fq">!job_kind:8</str>

        <str name="fq">!job_kind:9</str>

        <str name="fq">!sub_type:2</str>

        <str name="fq">job_tags:"186"</str>

        <str name="fq">job_dq:050090*</str>

        <str name="fq">job_salaryhigh:[10 TO *]</str>

        <str name="facet">true</str>

        <str name="facet.field">ecomp_id_doc</str>

        <str name="facet.limit">36</str>

        <str name="facet.mincount">1</str>

      <str name="start">0</str>

      <str name="rows">80</str>

      <str name="sort">score desc, id desc</str>

      <str name="q">((( job_title:"销售"~6^10000.0 )) OR (( job_context:"销售"~6^0.001 )))</str>

      <str name="q.op">AND</str>

      <str name="sortCustom">false</str>

      <str name="defType">jobscore</str>

      <str name="algo">aps7</str>

      <str name="fl">*</str>

      <str name="fl">score</str>

      </lst>

      </arr>

    </listener>