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 JamesDyer
Date Tue, 13 Nov 2012 20:11:55 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 JamesDyer:
http://wiki.apache.org/solr/DataImportHandler?action=diff&rev1=325&rev2=326

Comment:
SOLR-4051: Configurable DIH Property Writers

  
    * This operation will be started in a new thread and the ''status'' attribute in the response
should be shown ''busy'' now.
    * The operation may take some time depending on size of dataset.
-   * When full-import command is executed, it stores the start time of the operation in a
file located at ''conf/dataimport.properties''
+   * When full-import command is executed, it stores the start time of the operation in a
file located at ''conf/dataimport.properties''  ([[#Configuring The Property Writer|this file
is configurable]])
    * This stored timestamp is used when a delta-import operation is executed.
    * Queries to Solr are not blocked during full-imports.
    * It takes in extra parameters:
@@ -345, +345 @@

   {{{
   deltaQuery="SELECT MAX(did) AS did FROM ${dataimporter.request.dataView}"
  }}}
+ 
+ = Configuring The Property Writer =
+ <!> [[Solr4.1]] 
+ Add the tag 'propertyWriter' directly under the 'dataConfig' tag.  The property "last_index_time"
is converted to text and stored in the properties file and is available for the next import
as the variable '${dih.last_index_time}' . This tag gives control over how this properties
file is written.
+ 
+ {{{
+ <propertyWriter dateFormat="yyyy-MM-dd HH:mm:ss" type="SimplePropertiesWriter" directory="data"
filename="my_dih.properties" locale="en_US" />
+ }}}
+  * This tag is optional, resulting in the default locale,directory and filename.  The 'type'
will default to SimplePropertiesWriter for non-SolrCloud installations.  For SolrCloud, ZKPropertiesWriter
is default. 
+  * 'type' - the implementation class.  This is required unless <propertyWriter />
is omitted entirely.
+  * 'filename' - (SimplePropertiesWriter) The default is the name of the request handler
followed by ".properties", for instance, dataimport.properties
+  * 'directory' -(SimplePropertiesWriter) The default is "conf".
+  * 'dateFormat' - (SimplePropertiesWriter/ZKPropertiesWriter) Specify a java.text.SimpleDateFormat
pattern to use when converting the date to text.  The default is  yyyy-MM-dd HH:mm:ss .  For
JDBC escape syntax, use {'ts' ''yyyy-MM-dd HH:mm:ss''} .
+  * 'locale' - (SimplePropertiesWriter/ZKPropertiesWriter)  In Solr 4.1, The default locale
is the ROOT Locale.  This differs from Solr 4.0 and prior, which always used the machine's
default locale.
  
  = Usage with XML/HTTP Datasource =
  DataImportHandler can be used to index data from HTTP based data sources. This includes
using indexing from REST/XML APIs as well as from RSS/ATOM Feeds.

Mime
View raw message