2012-07-26 18 views
5

我剛安裝了Solr,現在我正在嘗試學習如何使用它。我想使用Solr Celllangid功能,所以我遵循鏈接教程。 Solr Cell的作品,但我無法做任何事情。無法在Solr 4.0中使用langid工作

solrconfig.xml,我有這樣的:

<updateRequestProcessorChain name="langid"> 
    <processor class="org.apache.solr.update.processor.LangDetectLanguageIdentifierUpdateProcessorFactory"> 
    <str name="langid.fl">text,title,subject,description</str> 
    <str name="langid.langField">language_s</str> 
    <str name="langid.fallback">en</str> 
    <bool name="langid.map">true</bool> 
    </processor> 
    <processor class="solr.LogUpdateProcessorFactory" /> 
    <processor class="solr.RunUpdateProcessorFactory" /> 
</updateRequestProcessorChain> 

(我也試圖與提卡),我送使用

curl "http://localhost:8983/solr/update/extract?literal.id=test&commit=true" -F "[email protected]" 

文檔但是,當我查詢,text:[* TO *]給我回我的文檔,但text_en:[* TO *]沒有;即使我宣稱它是存儲的,也是固執地不存在; *:word即使有"words"也沒有找到任何東西,所以它不會被阻止;我在日誌中找不到任何東西。我最好的猜測是,langid不運行,我不知道爲什麼。

EDIT:找到了答案:read more docs:P

由於LANGID被配置爲更新請求處理器鏈,它需要得到選擇(它不是自動的)。所以,這個工程:

curl "http://localhost:8983/solr/update/extract?literal.id=test&commit=true&update.chain=langid" -F "[email protected]" 
+0

感謝張貼,有同樣的麻煩。在我的情況下(最新的SOLR),更新網址是-Durl =「http:// localhost:8080/solr/update?update.chain = langid – 2013-06-11 16:10:38

回答

0

找到了答案:read more docs:P

由於LANGID被配置爲一個更新請求處理器鏈中,它需要得到選擇(它不是自動的)。所以,這個作品:

curl "http://localhost:8983/solr/update/extract?literal.id=test&commit=true&update.chain=langid" -F "[email protected]" 
相關問題