Dataimport handler
I had to trigger the dataimporter delta-import command from the code so I added support for this function.
Example:
1 2 3 4 5 6 7 |
from sunburnt import SolrInterface SOLR_URL = 'http://some.url:8983/solr/' _s = SolrInterface(SOLR_URL) _s.dataimport('delta-import') _response = _s.dataimport('status') print _response.import_status print _response.import_status.time_taken |
Following properties are available in the SolrImportStatus (_response.import_status) object:
1 2 3 4 5 6 7 8 9 10 11 12 |
markers = [ ('Total Requests made to DataSource', 'requests'), ('Total Rows Fetched', 'rows_fetched'), ('Total Documents Skipped', 'docs_skipped'), ('Full Dump Started', 'full_started'), ('Delta Dump started', 'delta_started'), ('Committed', 'committed'), ('Optimized', 'optimized'), ('Total Changed Documents', 'docs_changed'), ('Total Documents Processed', 'docs_processed'), ('Time taken ', 'time_taken'), ] |
Source code can be found on my github page: https://github.com/charlesnagy/sunburnt
Recent comments