{"action":"opened","issue":{"url":"https://api.github.com/repos/datacleaner/DataCleaner/issues/610","labels_url":"https://api.github.com/repos/datacleaner/DataCleaner/issues/610/labels{/name}","comments_url":"https://api.github.com/repos/datacleaner/DataCleaner/issues/610/comments","events_url":"https://api.github.com/repos/datacleaner/DataCleaner/issues/610/events","html_url":"https://github.com/datacleaner/DataCleaner/issues/610","id":103786860,"number":610,"title":"Null Filter on Elasticsearch Uses Wrong Type of Query","user":{"login":"maphysics","id":3769059,"avatar_url":"https://avatars.githubusercontent.com/u/3769059?v=3","gravatar_id":"","url":"https://api.github.com/users/maphysics","html_url":"https://github.com/maphysics","followers_url":"https://api.github.com/users/maphysics/followers","following_url":"https://api.github.com/users/maphysics/following{/other_user}","gists_url":"https://api.github.com/users/maphysics/gists{/gist_id}","starred_url":"https://api.github.com/users/maphysics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maphysics/subscriptions","organizations_url":"https://api.github.com/users/maphysics/orgs","repos_url":"https://api.github.com/users/maphysics/repos","events_url":"https://api.github.com/users/maphysics/events{/privacy}","received_events_url":"https://api.github.com/users/maphysics/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-28T20:07:40Z","updated_at":"2015-08-28T20:07:40Z","closed_at":null,"body":"A null filter used to select data from an Elasticsearch datastore will use a term filter with a null value instead of an not with an exists filter to check for the presence of the field.  The term filter produces an error from Elasticsearch when filtering on a date field.  \r\n\r\nFailed to execute phase [query], all shards failed; shardFailures {[lckVlrIBRfCZt7iRZJIRmw][index][0]: RemoteTransportException[[iad1esdn5vz39][inet[ip-address]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[index][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"bool\":{\"must_not\":{\"term\":{\"data.date\":null}}}}}]]]; nested: IllegalArgumentException[Invalid format: \"null\"]; }{[lckVlrIBRfCZt7iRZJIRmw][index][1]: RemoteTransportException[[iad1esdn5vz39][inet[ip address]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[index][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"bool\":{\"must_not\":{\"term\":{\"data.date\":null}}}}}]]]; nested: IllegalArgumentException[Invalid format: \"null\"]; }{[wBZD9eocS5SDbjKw4VExQg][index][2]: RemoteTransportException[[iad1esdn2vz22][inet[ip address]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[index][2]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"bool\":{\"must_not\":{\"term\":{\"data.date\":null}}}}}]]]; nested: IllegalArgumentException[Invalid format: \"null\"]; }{[wBZD9eocS5SDbjKw4VExQg]index[3]: RemoteTransportException[[iad1esdn2vz22][inet[ip address][indices:data/read/search[phase/query]]]; nested: SearchParseException[[index][3]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"bool\":{\"must_not\":{\"term\":{\"data.date\":null}}}}}]]]; nested: IllegalArgumentException[Invalid format: \"null\"]; }{[wBZD9eocS5SDbjKw4VExQg][index][4]: RemoteTransportException[[iad1esdn2vz22][inet[ip address]][indices:data/read/search[phase/query]]]; nested: SearchParseException[[index][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\"query\":{\"bool\":{\"must_not\":{\"term\":{\"data.date\":null}}}}}]]]; nested: IllegalArgumentException[Invalid format: \"null\"]; }\r\n\tat org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:237)\r\n\tat org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$1.onFailure(TransportSearchTypeAction.java:183)\r\n\tat org.elasticsearch.search.action.SearchServiceTransportAction$6.handleException(SearchServiceTransportAction.java:249)\r\n\tat org.elasticsearch.transport.netty.MessageChannelHandler.handleException(MessageChannelHandler.java:190)\r\n\tat org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:180)\r\n\tat org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:130)\r\n\tat org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)\r\n\tat org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)\r\n\tat org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)\r\n\tat org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)\r\n\tat org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)\r\n\tat org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)\r\n\tat org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)\r\n\tat org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)\r\n\tat org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)\r\n\tat org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)\r\n\tat org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)\r\n\tat org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)\r\n\tat org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)\r\n\tat org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)\r\n\tat org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)\r\n\tat org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)\r\n\tat org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)\r\n\tat org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)\r\n\tat org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n\r\n"}}