Solr : data import handler and solr cell
Asked Answered
S

1

1

Is it possible to index rich document (pdf, office)... with data import handler using solr cell.

I use solr 3.2.

Thanks.

Sherylsheryle answered 13/7, 2011 at 8:38 Comment(0)
P
1

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>

This functionality was implemented in SOLR-1358.

Patrickpatrilateral answered 13/7, 2011 at 9:14 Comment(3)
i have found few minutes ago but i have an error : GRAVE: Full Import failed:org.apache.solr.handler.dataimport.DataImportHandlerEx ception: No dataSource :bin available for entity :94600730275216 Processing Doc ument # 1. I don't know why.Sherylsheryle
But i have configured a datasourceSherylsheryle
Your question was "Is it possible?", and it is. Please ask a separate question.Patrickpatrilateral

© 2022 - 2024 — McMap. All rights reserved.