Concept Flow - Document versioning
Start: Document Indexed
Assign Version = 1
Update Request Received
Check Version in Request
Update
Increment Version
Save Document
End
When a document is first indexed, it gets version 1. On updates, Elasticsearch checks the version to avoid conflicts. If versions match, it updates and increments the version. If not, it rejects the update.