0

solr セルを使用してデータ インポート ハンドラを使用してリッチ ドキュメント (pdf、office) のインデックスを作成することは可能ですか。

私はsolr3.2を使用しています。

ありがとう。

4

1 に答える 1

1

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で実装されました。

于 2011-07-13T09:14:02.663 に答える