Solr : 数据导入处理程序和 solr 单元 [英] Solr : data import handler and solr cell

查看:43
本文介绍了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 中实现.

This functionality was implemented in SOLR-1358.

这篇关于Solr : 数据导入处理程序和 solr 单元的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆