How to forcibly abort data import into the SOLR DIH HTTP API

Follow the steps to generate the error:

1. Configure the large amount of data (around 4 GB or more than 50 millions of records)
2. Give proper data-config.xml file for indexing the data from remote database server.
3. During indexing the data into solr from SQL SERVER 2010, at the half way unplug the     
   network cable and see the status in solr. e.g.
   localhost:8083/solr/core1/dataimport?command=status
   or
   localhost:8083/solr/core1/dataimport
4. Pass few seconds then again plug back the cable.
5. You can clearly see that there is just only "Time Elapsed" parameter increase.      
   "Total Rows Fetched" & "Total Documents Processed" remains same for infinite time.
6. You can regenerate this for small data also.
7. Work around is you need to restart the solr. (But this is not good solution) 

Note. This is a very important question, because many organizations do not use this valuable product just because of this endless database connection problem. The solution could be: Strongly interrupt indexing of data or provide a mechanism to force interrupt indexing. Hope you guys know that the abort team is also not a job.

+4
source share
1 answer

From the Solr documentation ( http://wiki.apache.org/solr/DataImportHandler )

, URL- http://:/solr/dataimport? command = abort.

DIH abort

+1

Source: https://habr.com/ru/post/1546524/


All Articles