[英]Solr : data import handler and solr cell
是否可以通過使用 solr 單元的數據導入處理程序來索引豐富的文檔(pdf、office)...。
我使用 solr 3.2。
謝謝。
Solr Cell,又名ExtractingRequestHandler ,在后台使用Apache Tika ,后者可以輕松集成到 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中實現。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.