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 ------------------------------------------------------------------------------ * '''`parentDeltaQuery`''' : Only used in delta-import * '''`deletedPkQuery`''' : Only used in delta-import - + [[Anchor(commands)]] - == Commands == + == Commands == - The handler exposes all its API as http requests . The following are the possible operations - * '''full-import''' : Full Import operation can be started by hitting the URL `http://<host>:<port>/solr/dataimport?command=full-import`. This operation will be started in a new thread and the ''status'' attribute in the response should be shown ''busy'' now. Depending on the size of your data set, this operation may take some time. When full-import command is executed, it stores the start time of the operation in a file located at ''conf/dataimport.properties''. This stored timestamp is used when a delta-import operation is executed. + * '''full-import''' : Full Import operation can be started by hitting the URL `http://<host>:<port>/solr/dataimport?command=full-import` + * 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'' + * This stored timestamp is used when a delta-import operation is executed. + * It takes in extra parameters + * '''clean''' : (default 'true'). Tells whether to clean up the index before the indexing is started + * '''commit''': (default 'true'). Tells whether to commit+optimize after the operation + * '''debug''' : (default false). Runs in debug mode.It is used by the interactive development mode ([#interactive see here]) * '''delta-import''' : For incremental imports and change detection run the command `http://<host>:<port>/solr/dataimport?command=delta-import` * '''status''' : To know the status of the current command , hit the URL `http://<host>:<port>/solr/dataimport` .It gives an elaborate statistics on no:of docs created, deleted, queries run, rows fetched , status etc * '''reload-config''' : If the data-config is changed and you wissh to reload the file without restarting Solr. run the command `http://<host>:<port>/solr/dataimport?command=reload-config` @@ -575, +582 @@ * ''formatDate'' : It is used like this `'${dataimporter.functions.formatDate(item.ID, yyyy-MM-dd HH:mm)}'` . The first argument can be a valid value from the !VariableResolver and the second cvalue can be a a format string (use !SimpledateFormat) . The first argument can be a computed value eg: `'${dataimporter.functions.formatDate('NOW-3DAYS', yyyy-MM-dd HH:mm)}'` and it uses the syntax of the datemath parser in Solr. (note that it must enclosed in single quotes) * ''escapeSql'' : Use this to escape special sql characters . eg : `'${dataimporter.functions.escapeSql(item.ID)}'` . Takes only one argument and must be a valid value in the !VaraiableResolver. * ''encodeUrl'' : Us this to encode urls . eg : `'${dataimporter.functions.encodeUrl(item.ID)}'` . Takes only one argument and must be a valid value in the !VariableResolver - + [[Anchor(interactive)]] = Interactive Development Mode = This is a new cool and powerful feature in the tool. It helps you build a dataconfig.xml with the UI. It can be accessed from http://host:port/solr/admin/dataimport.jsp . The features are * A UI with two panels . RHS takes in the input and LHS shows the output
