我刚刚安装了Solr,现在我正在尝试学习如何使用它.我想使用Solr Cell和langid功能,所以我按照链接的教程.Solr Cell工作,但我无法做任何事情.
在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>
Run Code Online (Sandbox Code Playgroud)
(我也试过Tika),然后我发了一份文件
curl "http://localhost:8983/solr/update/extract?literal.id=test&commit=true" -F "myfile=@test.xml"
Run Code Online (Sandbox Code Playgroud)
但是当我查询时,text:[* TO *]给我回复我的文件,但text_en:[* TO *]没有; language_s即使我宣布它是存储的,也是顽固地缺席; *:word虽然没有找到任何东西,但"words"它没有被阻止; 我在日志中找不到任何东西.我最好的猜测是,langid没有运行,我不知道为什么.
编辑:找到答案:阅读更多文档:p
由于langid被配置为更新请求处理器链,因此需要选择它(它不是自动的).所以,这有效:
curl "http://localhost:8983/solr/update/extract?literal.id=test&commit=true&update.chain=langid" -F "myfile=@test.xml"
Run Code Online (Sandbox Code Playgroud)
找到答案:阅读更多文档:p
由于 langid 被配置为更新请求处理器链,因此需要选择它(不是自动的)。所以,这有效:
curl "http://localhost:8983/solr/update/extract?literal.id=test&commit=true&update.chain=langid" -F "myfile=@test.xml"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
687 次 |
| 最近记录: |