<?xml version="1.0" encoding="UTF-8" ?>
<!--
 Solr Configuration for StoryCove Collections Core
-->
<config>
  <luceneMatchVersion>9.9.0</luceneMatchVersion>

  <dataDir>${solr.data.dir:}</dataDir>

  <directoryFactory name="DirectoryFactory"
                    class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>

  <codecFactory class="solr.SchemaCodecFactory"/>

  <indexConfig>
    <lockType>${solr.lock.type:native}</lockType>
    <infoStream>true</infoStream>
  </indexConfig>

  <jmx />

  <updateHandler class="solr.DirectUpdateHandler2">
    <updateLog>
      <str name="dir">${solr.ulog.dir:}</str>
      <int name="numVersionBuckets">${solr.ulog.numVersionBuckets:65536}</int>
    </updateLog>

    <autoCommit>
      <maxTime>15000</maxTime>
      <openSearcher>false</openSearcher>
    </autoCommit>

    <autoSoftCommit>
      <maxTime>1000</maxTime>
    </autoSoftCommit>
  </updateHandler>

  <query>
    <maxBooleanClauses>1024</maxBooleanClauses>
    <filterCache class="solr.CaffeineCache"
                 size="512"
                 initialSize="512"
                 autowarmCount="0"/>
    <queryResultCache class="solr.CaffeineCache"
                     size="512"
                     initialSize="512"
                     autowarmCount="0"/>
    <documentCache class="solr.CaffeineCache"
                  size="512"
                  initialSize="512"
                  autowarmCount="0"/>
    <enableLazyFieldLoading>true</enableLazyFieldLoading>
  </query>

  <requestDispatcher handleSelect="false">
    <requestParsers enableRemoteStreaming="true"
                    multipartUploadLimitInKB="2048000"
                    formdataUploadLimitInKB="2048"
                    addHttpRequestToContext="false"/>
    <httpCaching never304="true" />
  </requestDispatcher>

  <requestHandler name="/select" class="solr.SearchHandler">
    <lst name="defaults">
      <str name="echoParams">explicit</str>
      <int name="rows">10</int>
      <str name="df">text</str>
      <str name="wt">json</str>
      <str name="indent">true</str>
      <str name="hl">true</str>
      <str name="hl.fl">name,description</str>
      <str name="hl.simple.pre">&lt;em&gt;</str>
      <str name="hl.simple.post">&lt;/em&gt;</str>
      <str name="hl.fragsize">150</str>
      <str name="facet">true</str>
      <str name="facet.field">tagNames</str>
      <str name="facet.field">isArchived</str>
      <str name="facet.mincount">1</str>
    </lst>
  </requestHandler>

  <requestHandler name="/update" class="solr.UpdateRequestHandler" />

  <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
    <lst name="invariants">
      <str name="q">*:*</str>
    </lst>
    <lst name="defaults">
      <str name="echoParams">all</str>
    </lst>
  </requestHandler>

  <queryResponseWriter name="json" class="solr.JSONResponseWriter">
    <str name="content-type">application/json; charset=UTF-8</str>
  </queryResponseWriter>

</config>
