Hey.
To clear all indexed items we first delete a document type and recreate it immediately. Unfortunately we get an error on creating the document type:
{ "error": "Invalid record. \nmessage:\n Validation of DocumentType failed.\nsummary:\n The following errors were found: Name is already taken\nresolution:\n Try persisting the document with valid data or remove the validations." }
If we wait some time (i.e. using sleep(3)
) everything works fine.
Q: Is there a better solution than using sleep()
? The post request is made synchronous.