Problem: I have a document type 'employee' with a property called 'department'. I would like to limit the number of employees in any given department to N.
Does ES provide means to enforce such a rule during document creation. If yes, what would the best way of achieving this.
Please note that using a RDBMS or some other form of storage is not an option.
This is a familiar problem, however, I am not aware of ways of achieving this in ElasticSearch. Pointers would be appreciated.