本文介绍了Solr:数据导入处理程序和Solr单元的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用solr单元使用数据导入处理程序对丰富的文档(pdf,office)...建立索引.
Is it possible to index rich document (pdf, office)... with data import handler using solr cell.
我使用solr 3.2.
I use solr 3.2.
谢谢.
推荐答案
Solr Cell,又名 ExtractingRequestHandler ,在后台使用 Apache Tika ,并且后者可以轻松集成到DataImportHandler中:
Solr Cell, aka ExtractingRequestHandler, uses Apache Tika behind the scenes, and the latter can easily be integrated into a DataImportHandler:
<dataConfig>
<!-- use any of type DataSource<InputStream> -->
<dataSource type="BinURLDataSource"/>
<document>
<!-- The value of format can be text|xml|html|none. this is the format in which the body is emited (the 'text' field) . The implicit field 'text' will have that format.
default value is 'text' (if not specified) . format="none" means body is not emited-->
<entity processor="TikaEntityProcessor" tikaConfig="tikaconfig.xml" url="${some.var.goes.here}" format="text">
<!--Do appropriate mapping here meta="true" means it is a metadata field -->
<field column="Author" meta="true" name="author"/>
<field column="title" meta="true" name="docTitle"/>
<!--'text' is an implicit field emited by TikaEntityProcessor . Map it appropriately-->
<field column="text"/>
</entity>
<document>
</dataConfig>
此功能已在 SOLR-1358 中实现.
这篇关于Solr:数据导入处理程序和Solr单元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!