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 commands ------------------------------------------------------------------------------ + <!> ["Solr1.3"] + [[TableOfContents]] = Overview = @@ -116, +118 @@ '''NOTE''' * The data-config in this example can also be written with only one entity ''item'' using SQL joins. In that case columns in ''category'' and ''feature'' tables can directly be read from the ''item'' entity. - * This example schema does not use the delta features. We will add more examples soon. + * This example does not use the delta features. We will add more examples soon. == Using create-schema command == - TODO + Once you have your data-config.xml setup. Start SOLR and use the ''create-schema'' to generate a SOLR schema.xml file according to the data-config.xml + The command can be executed by hitting the URL [http://localhost:8983/solr/dataimport?command=create-schema] with a browser. + + The newly created schema will be placed as ''conf/schema.xml.new'' Stop SOLR, rename it to schema.xml and again start SOLR. With the database connection information already in place in solrconfig.xml, we should be good to go ahead with full-import operations now. == Using full-import command == - TODO + Full Import operation can be started by hitting the URL [http://localhost:8983/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. At any time, you can hit [http://localhost:8983/solr/dataimport] to see the status flag. + + 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. == Using delta-import command == - TODO + Delta Import operation can be started by hitting the URL [http://localhost:8983/solr/dataimport?command=delta-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. At any time, you can hit [http://localhost:8983/solr/dataimport] to see the status flag. + + When delta-import command is executed, it reads the start time stored in ''conf/dataimport.properties''. It uses that timestamp to run delta queries (TODO: Example) and after completion, updates the timestamp in ''conf/dataimport.properties''. We hope to expand this documentation even more by adding more and more examples showing off the power of this tool. Keep checking back.
