Reputation: 297
I am using pysolr
to access solr's client API. However, I could not find how to call solr
's data import. Regardless of this python library, does anyone know how to automate the process of data import with solr
's DIH?
Both for full import and delta import.
Upvotes: 1
Views: 1443
Reputation: 1155
Using the API REST directly, for a full-import on 'mycollection' use a call like this:
curl -i "https://solr-server:8983/solr/mycollection/dataimport?command=full-import"
For a delta import, change 'full-import' to 'delta-import'.
Sadly, this call is not documented on the "Solr Ref Guide" to my knowledge.
Upvotes: 0
Reputation: 2156
If language is not a constraint , or even if you know how to make a Http GET and POST calls in Python , just after you create and define your entity , you can make rest calls like this http://localhost:8983/solr/dataimport?command=delta-import for Delta import or if you want to full-import replace it with full import . Regarding automation , if you have scheduling libraries in Python . You can easily automate the import using above url via scheduling . Or if you just want to do it after a certain period daily, just define a cronjob if you have Linux . It shall do it for you .
Upvotes: 1