{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/1941","repository_url":"https://api.github.com/repos/elastic/elasticsearch-net","labels_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/1941/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/1941/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/1941/events","html_url":"https://github.com/elastic/elasticsearch-net/issues/1941","id":142714089,"number":1941,"title":"Filter terms crashes with NumberFormatException[For input string: \"[\"];","user":{"login":"SLavrynenko","id":16493827,"avatar_url":"https://avatars.githubusercontent.com/u/16493827?v=3","gravatar_id":"","url":"https://api.github.com/users/SLavrynenko","html_url":"https://github.com/SLavrynenko","followers_url":"https://api.github.com/users/SLavrynenko/followers","following_url":"https://api.github.com/users/SLavrynenko/following{/other_user}","gists_url":"https://api.github.com/users/SLavrynenko/gists{/gist_id}","starred_url":"https://api.github.com/users/SLavrynenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SLavrynenko/subscriptions","organizations_url":"https://api.github.com/users/SLavrynenko/orgs","repos_url":"https://api.github.com/users/SLavrynenko/repos","events_url":"https://api.github.com/users/SLavrynenko/events{/privacy}","received_events_url":"https://api.github.com/users/SLavrynenko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-22T17:04:46Z","updated_at":"2016-03-22T17:16:43Z","closed_at":null,"body":"I've the following C# code:\r\n\r\n ```\r\n     var result2 = client.Search<Contact>(\r\n        s => s.Query(\r\n          q =>\r\n          {\r\n            return\r\n              q.Bool(\r\n                b => b.Must(\r\n                  m =>\r\n                  {\r\n                    var query = m.MatchAll();\r\n                    return query;\r\n                  })\r\n                  .Filter(f =>\r\n                  {\r\n                    var filter = f.Terms(p => p.Field(sf => sf.Tags).Terms(searchFilter.Tags));\r\n                    return filter;\r\n                  }));\r\n          }));\r\n```\r\n\r\nand it returns that response doesn't have any errors:\r\n`\t\tDebugInformation\t\"Valid NEST response built from a succesful low level call on POST: /_search\\r\\n# Audit trail of this API call:\\r\\n - HealthyResponse: Node: http://192.168.1.110:9200/ Took: 00:00:00.3432729\\r\\n# Request:\\r\\n<Request stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>\\r\\n# Response:\\r\\n<Response stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>\\r\\n\"\tstring`\r\n\r\nBut I see that there is error in ElasticSearch logs:\r\n```\r\nRemoteTransportException[[James Jaspers][192.168.1.110:9300][indices:data/read/search[phase/query]]]; nested: SearchParseException[failed to parse search source [{\"query\":{\"bool\":{\"must\":[{\"match_all\":{}}],\"filter\":[{\"terms\":{\"tags\":[[3765,8622,3766]]}}]}}}]]; nested: NumberFormatException[For input string: \"[\"];\r\nCaused by: SearchParseException[failed to parse search source [{\"query\":{\"bool\":{\"must\":[{\"match_all\":{}}],\"filter\":[{\"terms\":{\"tags\":[[3765,8622,3766]]}}]}}}]]; nested: NumberFormatException[For input string: \"[\"];\r\n```\r\n\r\nThe reason as I see is in the following: {\"tags\":[[3765,8622,3766]] - why it wrap values in double square brackets?"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/comments/199913701","html_url":"https://github.com/elastic/elasticsearch-net/issues/1941#issuecomment-199913701","issue_url":"https://api.github.com/repos/elastic/elasticsearch-net/issues/1941","id":199913701,"user":{"login":"SLavrynenko","id":16493827,"avatar_url":"https://avatars.githubusercontent.com/u/16493827?v=3","gravatar_id":"","url":"https://api.github.com/users/SLavrynenko","html_url":"https://github.com/SLavrynenko","followers_url":"https://api.github.com/users/SLavrynenko/followers","following_url":"https://api.github.com/users/SLavrynenko/following{/other_user}","gists_url":"https://api.github.com/users/SLavrynenko/gists{/gist_id}","starred_url":"https://api.github.com/users/SLavrynenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SLavrynenko/subscriptions","organizations_url":"https://api.github.com/users/SLavrynenko/orgs","repos_url":"https://api.github.com/users/SLavrynenko/repos","events_url":"https://api.github.com/users/SLavrynenko/events{/privacy}","received_events_url":"https://api.github.com/users/SLavrynenko/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T17:16:43Z","updated_at":"2016-03-22T17:16:43Z","body":"Yes it looks the same in the part how query is generated, but here we have additional part - NEST returns result that says that there were no errors. So it seems there is additional bug with result parsing from the ElasticSearch."}}