Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The "TikaEntityProcessor" page has been changed by NoblePaul. http://wiki.apache.org/solr/TikaEntityProcessor?action=diff&rev1=2&rev2=3 -------------------------------------------------- - = Configuration = + = TikaEntityProcessor = - Sample configuration + == Simple configuration == {{{ + <dataConfig> + <document> + <dataSource type="BinURLDataSource" name="bin"/> - <entity processor="TikaEntityProcessor" tikaConfig="tikaconfig.xml" url="${some.var.goes.here}" dataSource="bin" format="text"> + <entity processor="TikaEntityProcessor" tikaConfig="tikaconfig.xml" url="${some.var.goes.here}" dataSource="bin" 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> + </entity> + <document> + </dataConfig> + }}} === attributes === * url : (required) The url to the source. This depends on the !DataSource being used @@ -20, +26 @@ ==== fields ==== Each field may have an optional attribute meta="true". Which means this field is to be obtained from the !MetaData of the document. The column value is used as the key on metadata. Checkout the list of available keys from here [[http://svn.apache.org/viewvc/lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/DublinCore.java?revision=801678&view=markup | DublinCore]] , [[http://svn.apache.org/viewvc/lucene/tika/trunk/tika-core/src/main/java/org/apache/tika/metadata/MSOffice.java?revision=801678&view=markup |MSOffice]] + === DataSource == + use any !DataSource of type !DataSource<InputStream>. The inbuilt ones are + * !BinURLDataSource : use for both http as well as for files + * !BinContentStreamDataSource : Use for uploading content + * !BinFileDataSource : use for reading from file system + + + == Advanced Parsing == + The !TikaEntityProcessor can be nested with X!PathEntityProcessor for selctively indexing documents + + example: + {{{ + <dataConfig> + <document> + <dataSource type="BinURLDataSource" name="bin"/> + <dataSource type="FieldReaderDataSource" name="fld"/> + <entity processor="TikaEntityProcessor" tikaConfig="tikaconfig.xml" url="${some.var.goes.here}" dataSource="bin" format="html" rootEntity="false"> + <!--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 type="XPathEntityProcessor" forEach="/hml"> + <field xpath="//div" column="foo"/> + <field xpath="//h1" column="h1" /> + </entity> + </entity> + <document> + </dataConfig> + }}} +
