Solr MCP

by allenday
Verified
<?xml version="1.0" encoding="UTF-8" ?> <config> <luceneMatchVersion>9.5.0</luceneMatchVersion> <!-- Data Directory --> <dataDir>${solr.data.dir:}</dataDir> <!-- Directory for storing index files --> <directoryFactory name="DirectoryFactory" class="solr.NRTCachingDirectoryFactory"/> <!-- Request Handler for Search (with vector search) --> <requestHandler name="/select" class="solr.SearchHandler"> <lst name="defaults"> <str name="echoParams">explicit</str> <str name="wt">json</str> <str name="indent">true</str> <str name="df">_text_</str> <str name="rows">10</str> </lst> </requestHandler> <!-- Use built-in vector search capabilities --> <requestHandler name="/knn" class="solr.SearchHandler"> <lst name="defaults"> <str name="echoParams">explicit</str> <str name="wt">json</str> <str name="indent">true</str> </lst> </requestHandler> <!-- Handler for vector search --> <requestHandler name="/vector" class="solr.SearchHandler"> <lst name="defaults"> <str name="echoParams">explicit</str> <str name="wt">json</str> <str name="indent">true</str> <str name="df">_text_</str> <str name="rows">10</str> </lst> </requestHandler> <!-- SpellCheck --> <searchComponent name="spellcheck" class="solr.SpellCheckComponent"> <str name="queryAnalyzerFieldType">text_general</str> <lst name="spellchecker"> <str name="name">default</str> <str name="field">_text_</str> <str name="classname">solr.DirectSolrSpellChecker</str> <str name="distanceMeasure">internal</str> <float name="accuracy">0.5</float> <int name="maxEdits">2</int> <int name="minPrefix">1</int> <int name="maxInspections">5</int> <int name="minQueryLength">3</int> <float name="maxQueryFrequency">0.01</float> </lst> </searchComponent> <!-- Suggester for auto-complete --> <searchComponent name="suggest" class="solr.SuggestComponent"> <lst name="suggester"> <str name="name">default</str> <str name="lookupImpl">BlendedInfixLookupFactory</str> <str name="dictionaryImpl">DocumentDictionaryFactory</str> <str name="field">_text_</str> <str name="weightField">popularity</str> <str name="suggestAnalyzerFieldType">text_general</str> <str name="buildOnStartup">false</str> <str name="buildOnCommit">false</str> </lst> </searchComponent> <!-- Request handler for suggestions --> <requestHandler name="/suggest" class="solr.SearchHandler"> <lst name="defaults"> <str name="suggest">true</str> <str name="suggest.dictionary">default</str> <str name="suggest.count">10</str> </lst> <arr name="components"> <str>suggest</str> </arr> </requestHandler> <!-- Update request handlers --> <requestHandler name="/update" class="solr.UpdateRequestHandler"/> <requestHandler name="/update/json" class="solr.UpdateRequestHandler"> <lst name="defaults"> <str name="stream.contentType">application/json</str> <str name="stream.body">{}</str> </lst> </requestHandler> <!-- Standard components --> <updateHandler class="solr.DirectUpdateHandler2"/> <requestDispatcher> <requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048000" formdataUploadLimitInKB="2048"/> <httpCaching never304="true"/> </requestDispatcher> <!-- Manage cache sizes --> <query> <filterCache class="solr.FastLRUCache" size="512" initialSize="512" autowarmCount="0"/> <queryResultCache class="solr.LRUCache" size="512" initialSize="512" autowarmCount="0"/> <documentCache class="solr.LRUCache" size="512" initialSize="512" autowarmCount="0"/> <cache name="knnCache" class="solr.search.LRUCache" size="512" initialSize="512" autowarmCount="0"/> </query> <!-- Response Writers --> <queryResponseWriter name="json" class="solr.JSONResponseWriter"> <str name="content-type">text/plain; charset=UTF-8</str> </queryResponseWriter> </config>