Dear Wiki user,

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

The following page has been changed by NoblePaul:
http://wiki.apache.org/solr/DataImportHandler

The comment on the change is:
LogTransformer,  ContentStreamDataSource, RegexTransformer

------------------------------------------------------------------------------
     <field column="full_name"/>
     <field column="firstName" regex="Mr(\w*)\b.*" sourceColName="full_name"/>
     <field column="lastName" regex="Mr.*?\b(\w*)" sourceColName="full_name"/>
+    
+    <!-- another way of doing the same -->
+    <field column="fullName" regex="Mr(\w*)\b(.*)" 
groupNames="firstName,lastName"/>
     <field column="mailId" splitBy="," sourceColName="emailids"/>
  </entity>
  }}}
@@ -488, +491 @@

   * '''`regex`''' : The regular expression that is used to match . This or 
`splitBy` must be present for each field. If not, that field is not touched by 
the transformer . If `replaceWith` is absent, each ''group'' is taken as a 
value and a list of values is returned
   * '''`sourceColName`''' : The column on which the regex is to be applied. If 
this is absent source and target are same
   * '''`splitBy`''' : If the `regex` is used to split a String to obtain 
multipple values use this
+  * '''`groupNames`''' : If the `regex` contains groups and each of them go to 
different fields , each group can be given a name (comma separated) . If some 
groups are not to be named leave a space between commas.  <!> ["Solr1.4"]
   * '''`replaceWith`''' : Used alongwith `regex` . It is equivalent to the 
method `new String(<sourceColVal>).replaceAll(<regex>, <replaceWith>)`
  Here the attributes 'regex' and 'sourceColName' are custom attributes used by 
the transformer. It reads the field 'full_name' from the resultset and 
transform it to two target fields 'firstName' and 'lastName' . So even though 
the query returned only one column 'full_name' in the resultset the solr 
document gets two extra fields 'firstName' and 'lastName' wich are 'derived' 
fields.
  
@@ -621, +625 @@

  ==== Attributes ====
   * '''`clob`''' : Boolean value to signal if !ClobTransformer should process 
this field or not.
   * '''`sourceColName`''' : The source column to be used as input. If this is 
absent source and target are same
+ 
+ === LogTransformer ===
+ <!> ["Solr1.4"]
+ 
+ Can be used to Log data to console/logs.
+ e.g.:
+ {{{
+ <entity ...
+ transformer="Logtransformer"
+ logTemplate="The name is ${e.name}" logLevel="debug" >
+ ....
+ </entity>}}}
+ 
+ Unlike other Transformers this does not apply to any field so the attributes 
are applied on the entity itself.
+ 
+ 
  [[Anchor(example-transformers)]]
  === Transformers Example ===
  
@@ -811, +831 @@

  {{{
  <entity dataSource="f" processor="XPathEntityProcessor" 
dataField="dbEntity.xmlData"/>
  }}}
+ 
+ === ContentStreamDataSource ===
+ <!> ["Solr1.4"]
+ 
+ Use this to use the POST data as the DataSource. This can be used with any 
!EntityProcessor that uses a !DataSOurce<Reader>
+ 
  
  
  == Boosting , Skipping documents ==

Reply via email to