11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

deletedPkQuery<br />

deltaImportQuery<br />

SQL query used if the operation is delta-import.<br />

SQL query used if the operation is delta-import. If this is not present, DIH tries to construct<br />

the import query by(after identifying the delta) modifying the 'query' (this is error prone).<br />

There is a namespace ${dataimporter.delta. } which can be used<br />

in this query. For example, select * from tbl where<br />

id=${dataimporter.delta.id}.<br />

The XPathEntityProcessor<br />

This processor is used when indexing XML formatted data. The data source is typically URLDataSource or FileD<br />

ataSource. Xpath can also be used with the FileListEntityProcessor described below, to generate a document<br />

from each file.<br />

The entity attributes unique to this processor are shown below.<br />

Attribute<br />

Processor<br />

url<br />

stream<br />

Use<br />

Required. Must be set to "XpathEntityProcessor".<br />

Required. HTTP URL or file location.<br />

Optional: Set to true for a large file or download.<br />

forEach Required unless you define use<strong>Solr</strong>AddSchema. The Xpath expression which<br />

demarcates each record. This will be used to set up the processing loop.<br />

xsl<br />

use<strong>Solr</strong>AddSchema<br />

flatten<br />

Optional: Its value (a URL or filesystem path) is the name of a resource used as a<br />

preprocessor for applying the XSL transformation.<br />

Set this to true if the content is in the form of the standard <strong>Solr</strong> update XML schema.<br />

Optional: If set true, then text from under all the tags is extracted into one field.<br />

Each field element in the entity can have the following attributes as well as the default ones.<br />

Attribute<br />

xpath<br />

commonField<br />

Required. The XPath expression which will extract the content from the record for this field.<br />

Only a subset of Xpath syntax is supported.<br />

Optional. If true, then when this field is encountered in a record it will be copied to future<br />

records when creating a <strong>Solr</strong> document.<br />

Use<br />

Here is an example from the " " collection in the example (<br />

rss dih example/example-DIH/solr/rss/conf/<br />

rss-data-config.xml):<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

215

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!