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 ShalinMangar
Date Mon, 31 Mar 2008 12:04:28 GMT
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 ShalinMangar:
http://wiki.apache.org/solr/DataImportHandler

The comment on the change is:
Added details on DateFormatTransformer

------------------------------------------------------------------------------
   * Make an entity use a function by specifying ''transformer="script:<function-name>"''
in the ''entity'' node.
   * In the above data-config, the javascript function ''f1'' will be executed once for each
row returned by entity e.
  
+ === DateFormatTransformer ===
+ There is a built-in transformer called the !DateFormatTransformer which is useful for parsing
date/time strings into java.util.Date instances.
+ 
+ {{{
+ <field column="date" xpath="/RDF/item/date" dateTimeFormat="yyyy-MM-dd'T'hh:mm:ss" />
+ }}}
+ 
+ The above field definition is used in the RSS example to parse the publish date of the RSS
feed item. The transformer only applies to a field which has the attribute 'dateTimeFormat'
and it uses the syntax of java's [http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
SimpleDateFormat].
+ 
  == EntityProcessor ==
  Each entity is handled by a default Entity processor called !SqlEntityProcessor. This works
well for systems which use RDBMS as a datasource. For other kind of datasources like  REST
or Non Sql datasources you can choose to implement this interface `org.apache.solr.handler.dataimport.Entityprocessor`
  {{{

Mime
View raw message