2015-12-03 66 views
1

我已經創建了一個名爲「模糊」的一個核心Solr的,但我無法將文檔添加到核心的時候,我嘗試使用以下URL添加文件:Solr的錯誤添加文檔

http://localhost:8983/solr/Fuzzy/update?stream.body=<add><doc><field%20name="id">1</field><field%20name="original">München</field><field%20name="mutation">Munchen</field></doc></add>&commit=true 

但我不斷收到messageL

未知UpdateRequestProcessorChain:附加未知領域,以最架構

我不知道爲什麼我得到這個消息,在我的配置文件一世有:

<schemaFactory class="ClassicIndexSchemaFactory"/>

和schema.xml中:

<?xml version="1.0" encoding="UTF-8" ?> 
<schema name="WikiData" version="1.5"> 
    <field name="id" type="int" indexed="true" stored="true" required="true" multiValued="false" /> 
    <field name="original" type="text_general" indexed="true" stored="true" /> 
    <field name="mutation" type="text_general" indexed="true" stored="true" /> 
    <field name="_version_" type="long" indexed="true" stored="true"/> 
    <uniqueKey>id</uniqueKey> 

    <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/> 
    <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/> 
    <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100" multiValued="false"> 
     <analyzer type="index"> 
     <tokenizer class="solr.StandardTokenizerFactory"/> 
     <filter class="solr.LowerCaseFilterFactory"/> 
     <filter class="solr.PorterStemFilterFactory"/> 
     </analyzer> 
     <analyzer type="query"> 
     <tokenizer class="solr.StandardTokenizerFactory"/> 
     <filter class="solr.LowerCaseFilterFactory"/> 
     <filter class="solr.PorterStemFilterFactory"/> 
     </analyzer> 
    </fieldType> 
</schema> 

solrconfig.xml中:

<?xml version="1.0" encoding="UTF-8" ?> 
<config> 
    <luceneMatchVersion>5.3.1</luceneMatchVersion> 
    <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" /> 
    <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" /> 

    <lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" /> 
    <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" /> 

    <lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" /> 
    <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" /> 

    <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" /> 
    <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" /> 
    <dataDir>${solr.data.dir:}</dataDir> 
    <directoryFactory name="DirectoryFactory" 
        class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/> 
    <codecFactory class="solr.SchemaCodecFactory"/> 

    <schemaFactory class="ClassicIndexSchemaFactory"/> 
    <indexConfig> 
    <lockType>${solr.lock.type:native}</lockType> 
    </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>${solr.autoCommit.maxTime:15000}</maxTime> 
     <openSearcher>false</openSearcher> 
    </autoCommit> 
    <autoSoftCommit> 
     <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime> 
    </autoSoftCommit> 
    </updateHandler> 

    <query> 
    <maxBooleanClauses>1024</maxBooleanClauses> 
    <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="perSegFilter" 
      class="solr.search.LRUCache" 
      size="10" 
      initialSize="0" 
      autowarmCount="10" 
      regenerator="solr.NoOpRegenerator" /> 
    <enableLazyFieldLoading>true</enableLazyFieldLoading> 

    <queryResultWindowSize>20</queryResultWindowSize> 
    <queryResultMaxDocsCached>200</queryResultMaxDocsCached> 
    <listener event="newSearcher" class="solr.QuerySenderListener"> 
     <arr name="queries"> 
     </arr> 
    </listener> 
    <listener event="firstSearcher" class="solr.QuerySenderListener"> 
     <arr name="queries"> 
     </arr> 
    </listener> 
    <useColdSearcher>false</useColdSearcher> 
    <maxWarmingSearchers>2</maxWarmingSearchers> 

    </query> 
    <requestDispatcher handleSelect="false" > 
    <requestParsers enableRemoteStreaming="true" 
        multipartUploadLimitInKB="2048000" 
        formdataUploadLimitInKB="2048" 
        addHttpRequestToContext="false"/> 
    <httpCaching never304="true" /> 
    </requestDispatcher> 
    <requestHandler name="/select" class="solr.SearchHandler"> 

    <admin> 
    <defaultQuery>*:*</defaultQuery> 
    </admin> 

</config> 
+0

檢查大小寫不敏感...模糊和模糊是不同的... –

+0

模糊是正確的名稱,我很確定。如果它是一個錯誤的核心名稱,我會得到一個404 –

+0

這將是有益的,如果你能分享solrconfig.xml –

回答

3

默認的託管模式,其the documentation建議應該被複制到schema.xml包括更新處理器請求鏈,當不使用託管模式時不需要。 (或者至少這是真的在6.1.0)

以下幾行應該被刪除或solrconfig.xml中註釋掉:

<initParams path="/update/**"> 
    <lst name="defaults"> 
    <str name="update.chain">add-unknown-fields-to-the-schema</str> 
    </lst> 
</initParams> 

另一種可能是繼續使用託管模式,而不是的經典方法,但將其設置爲不可變,儘管我沒有測試過這個例子

<schemaFactory class="ManagedIndexSchemaFactory"> 
    <bool name="mutable">false</bool> 
    <str name="managedSchemaResourceName">managed-schema</str> 
</schemaFactory> 
+0

@moondaisy感謝編輯:更清晰。 –

相關問題