For my usecase, I will be deleting all solr docs everyday and indexing new solr docs right after it:
Delete:
conf = {
"set-property": [
{"requestDispatcher.requestParsers.enableRemoteStreaming": True},
{"requestDispatcher.requestParsers.enableStreamBody": True},
]
}
resp = requests.post(f"http://{SOLR_HOST}:{SOLR_PORT}/solr/product_{country}/config", json=conf)
resp = requests.get(
f"http://{SOLR_HOST}:{SOLR_PORT}/solr/product_{country}/update"
+ "?stream.body=<delete><query>*:*</query></delete>"
)
Insert:
pySolr.solr.add_objects(..., commit=true, softCommit=true)
This seems to work fine. However, if I add a breakpoint between insert and delete, I notice that my solr core is empty (0 docs). Is there any way I can maintain the old solr docs until the insert command runs succesfully?