Elasticsearch update by query - update ONLY the last document

Update by query does not support a size. You would need to run a query first using size and sorting, and then use the update API on that single document.