{"action":"created","issue":{"url":"https://api.github.com/repos/searchbox-io/Jest/issues/257","labels_url":"https://api.github.com/repos/searchbox-io/Jest/issues/257/labels{/name}","comments_url":"https://api.github.com/repos/searchbox-io/Jest/issues/257/comments","events_url":"https://api.github.com/repos/searchbox-io/Jest/issues/257/events","html_url":"https://github.com/searchbox-io/Jest/issues/257","id":116299333,"number":257,"title":"Update is ignoring null values","user":{"login":"voal1011","id":2505285,"avatar_url":"https://avatars.githubusercontent.com/u/2505285?v=3","gravatar_id":"","url":"https://api.github.com/users/voal1011","html_url":"https://github.com/voal1011","followers_url":"https://api.github.com/users/voal1011/followers","following_url":"https://api.github.com/users/voal1011/following{/other_user}","gists_url":"https://api.github.com/users/voal1011/gists{/gist_id}","starred_url":"https://api.github.com/users/voal1011/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voal1011/subscriptions","organizations_url":"https://api.github.com/users/voal1011/orgs","repos_url":"https://api.github.com/users/voal1011/repos","events_url":"https://api.github.com/users/voal1011/events{/privacy}","received_events_url":"https://api.github.com/users/voal1011/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-11T09:49:47Z","updated_at":"2015-11-12T19:01:00Z","closed_at":null,"body":"Hi, it is not possible to update fields with null values.\r\n\r\nFor example:\r\nAn update with payload like this \r\n```\r\n{\r\n     \"document\": {\r\n             \"field\": null\r\n    }\r\n}\r\n```\r\nwill not work."},"comment":{"url":"https://api.github.com/repos/searchbox-io/Jest/issues/comments/156202329","html_url":"https://github.com/searchbox-io/Jest/issues/257#issuecomment-156202329","issue_url":"https://api.github.com/repos/searchbox-io/Jest/issues/257","id":156202329,"user":{"login":"kramer","id":589203,"avatar_url":"https://avatars.githubusercontent.com/u/589203?v=3","gravatar_id":"","url":"https://api.github.com/users/kramer","html_url":"https://github.com/kramer","followers_url":"https://api.github.com/users/kramer/followers","following_url":"https://api.github.com/users/kramer/following{/other_user}","gists_url":"https://api.github.com/users/kramer/gists{/gist_id}","starred_url":"https://api.github.com/users/kramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kramer/subscriptions","organizations_url":"https://api.github.com/users/kramer/orgs","repos_url":"https://api.github.com/users/kramer/repos","events_url":"https://api.github.com/users/kramer/events{/privacy}","received_events_url":"https://api.github.com/users/kramer/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T19:01:00Z","updated_at":"2015-11-12T19:01:00Z","body":"Here is an actual test case that updates a field to a `null`value and it works.\r\n\r\n```java\r\n@ElasticsearchIntegrationTest.ClusterScope(scope = ElasticsearchIntegrationTest.Scope.SUITE, numDataNodes = 1)\r\npublic class UpdateIntegrationTest extends AbstractIntegrationTest {\r\n\r\n    @Test\r\n    public void updateWithNullFieldValue() throws Exception {\r\n        client().index(\r\n                new IndexRequest(\"twitter\", \"tweet\", \"1\")\r\n                        .source(\"{\\\"user\\\":\\\"kramer\\\", \\\"tags\\\":\\\"test one two three\\\"}\")\r\n                        .refresh(true)\r\n        ).actionGet();\r\n\r\n        DocumentResult result = client.execute(new Update\r\n                .Builder(\"{\\\"doc\\\":{\\\"user\\\":\\\"kramer\\\", \\\"tags\\\":null}}\")\r\n                .index(\"twitter\")\r\n                .type(\"tweet\")\r\n                .id(\"1\")\r\n                .build());\r\n        assertTrue(result.getErrorMessage(), result.isSucceeded());\r\n        assertEquals(\"twitter\", result.getIndex());\r\n        assertEquals(\"tweet\", result.getType());\r\n        assertEquals(\"1\", result.getId());\r\n\r\n        DocumentResult getResult = client.execute(new Get.Builder(\"twitter\", \"1\").type(\"tweet\").build());\r\n        assertEquals(null, ((Map) getResult.getValue(\"_source\")).get(\"tags\"));\r\n    }\r\n}\r\n```\r\n\r\nYou definitely need to confirm the actual payload json that you are sending to ES when using jest."}}