{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/17333","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17333/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17333/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17333/events","html_url":"https://github.com/elastic/elasticsearch/issues/17333","id":143301970,"number":17333,"title":"Provide created flag to IndexingOperationListener#postCreate","user":{"login":"oillio","id":205051,"avatar_url":"https://avatars.githubusercontent.com/u/205051?v=3","gravatar_id":"","url":"https://api.github.com/users/oillio","html_url":"https://github.com/oillio","followers_url":"https://api.github.com/users/oillio/followers","following_url":"https://api.github.com/users/oillio/following{/other_user}","gists_url":"https://api.github.com/users/oillio/gists{/gist_id}","starred_url":"https://api.github.com/users/oillio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oillio/subscriptions","organizations_url":"https://api.github.com/users/oillio/orgs","repos_url":"https://api.github.com/users/oillio/repos","events_url":"https://api.github.com/users/oillio/events{/privacy}","received_events_url":"https://api.github.com/users/oillio/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:CRUD","name":":CRUD","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Java%20API","name":":Java API","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/discuss","name":"discuss","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-24T16:58:34Z","updated_at":"2016-03-24T23:12:53Z","closed_at":null,"body":"I am working on a plugin that provides an IndexingOperationListener.  It would be very helpful if there was a way to tell if an indexing operation created or updated a document during the postCreate call.\r\n\r\n**Describe the feature**:  The easiest way I see to provide this information would be to add a \"created\" field to the Engine.Index class.  This would be set during the index operation, just after the version is updated on this object ([here](https://github.com/elastic/elasticsearch/blob/e50eeeaffb33d7eaa0f7c2ebc71f1208460f4fcd/core/src/main/java/org/elasticsearch/index/engine/InternalEngine.java#L368-L376)).\r\n\r\nI would be happy to submit a PR for this, if it is an acceptable solution."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/201068569","html_url":"https://github.com/elastic/elasticsearch/issues/17333#issuecomment-201068569","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17333","id":201068569,"user":{"login":"oillio","id":205051,"avatar_url":"https://avatars.githubusercontent.com/u/205051?v=3","gravatar_id":"","url":"https://api.github.com/users/oillio","html_url":"https://github.com/oillio","followers_url":"https://api.github.com/users/oillio/followers","following_url":"https://api.github.com/users/oillio/following{/other_user}","gists_url":"https://api.github.com/users/oillio/gists{/gist_id}","starred_url":"https://api.github.com/users/oillio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oillio/subscriptions","organizations_url":"https://api.github.com/users/oillio/orgs","repos_url":"https://api.github.com/users/oillio/repos","events_url":"https://api.github.com/users/oillio/events{/privacy}","received_events_url":"https://api.github.com/users/oillio/received_events","type":"User","site_admin":false},"created_at":"2016-03-24T23:12:53Z","updated_at":"2016-03-24T23:12:53Z","body":"PR submitted.  While looking through the code on master, it looks like the application of IndexingOperationListener has been changed significantly compared to 2.x.\r\n\r\nFrom what I can tell, there is no longer any way for a plugin to register an IndexingOperationListener on a shard."}}