lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "DataImportHandler" by FergusMcMenemie
Date Thu, 08 Oct 2009 11:20:28 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "DataImportHandler" page has been changed by FergusMcMenemie:
http://wiki.apache.org/solr/DataImportHandler?action=diff&rev1=214&rev2=215

   * '''`locale`''' : The locale to be used for parsing the strings. If this is absent, the
system's default locale is used. It must be specified as language-country. For example en-US.
  
  === TemplateTransformer ===
- Uses the powerful template engine of !DataImportHandler to construct/modify a field value.
+ Allows fields to be constructed/modified after an DIH entity has finished reading its input.
Can be used to overwrite or modify any existing field or to create new fields. The value assigned
to the field is based on a static string which can optionally contain DIH-variables, placeholders
also known as templates. If a template string contains placeholders or variables, they must
be defined when the transformer is being evaluated, otherwise the template attribute is ignored
for that field.
  eg:
  {{{
  <entity name="e" transformer="TemplateTransformer" ..>
@@ -620, +620 @@

  ...
  </entity>
  }}}
- The rules for the template are same as the templates in 'query', 'url' etc. it helps to
concatenate multiple values or add extra characters to field for injection. Only appplies
on fields which have a 'template' attribute.
+ The rules for the template are same as the templates in 'query', 'url' etc. it allows the
concatenation of multiple values to a field or adds extra characters to field for injection.
In the above example there are two placeholders '${e.name}' and '${eparent.surname}'.
  
  '''Attributes'''
  
-  * '''`template`''' : The template string. In the above example there are two placeholders
'${e.name}' and '${eparent.surname}' .   Both the values must be present when it is being
evaluated. Else it will not be evaluated.
+  * '''`template`''' : The template string to be assigned to the field.
  
  === HTMLStripTransformer ===
  <!> [[Solr1.4]]
@@ -771, +771 @@

  <dataConfig>
      <dataSource type="FileDataSource" />
      <document>
-         <entity name="f" processor="FileListEntityProcessor" baseDir="/some/path/to/files"
fileName=".*xml" newerThan="'NOW-3DAYS'" recursive="true" rootEntity="false" dataSource="null">
+         <entity name="f" processor="FileListEntityProcessor" baseDir="/some/path/to/files"
fileName=".*xml" nAnchor(datasource)>>
+ A class can extend `org.apache.solr.handler.dataimport.DataSource` . [[http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataSource.java?view=markup|See
source]]
-             <entity name="x" processor="XPathEntityProcessor" forEach="/the/record/xpath"
url="${f.fileAbsolutePath}">
-                 <field column source]]
  
  and can be used as a !DataSource. It must be3A//abc.com/a.txt" dataSource="data-source-name">
     <!-- copies the text to a field called 'text' in Solr-->

Mime
View raw message