{"action":"created","issue":{"url":"https://api.github.com/repos/ankane/searchkick/issues/706","repository_url":"https://api.github.com/repos/ankane/searchkick","labels_url":"https://api.github.com/repos/ankane/searchkick/issues/706/labels{/name}","comments_url":"https://api.github.com/repos/ankane/searchkick/issues/706/comments","events_url":"https://api.github.com/repos/ankane/searchkick/issues/706/events","html_url":"https://github.com/ankane/searchkick/issues/706","id":167663814,"number":706,"title":"Weird results when searching on an email field","user":{"login":"jwoertink","id":2391,"avatar_url":"https://avatars.githubusercontent.com/u/2391?v=3","gravatar_id":"","url":"https://api.github.com/users/jwoertink","html_url":"https://github.com/jwoertink","followers_url":"https://api.github.com/users/jwoertink/followers","following_url":"https://api.github.com/users/jwoertink/following{/other_user}","gists_url":"https://api.github.com/users/jwoertink/gists{/gist_id}","starred_url":"https://api.github.com/users/jwoertink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwoertink/subscriptions","organizations_url":"https://api.github.com/users/jwoertink/orgs","repos_url":"https://api.github.com/users/jwoertink/repos","events_url":"https://api.github.com/users/jwoertink/events{/privacy}","received_events_url":"https://api.github.com/users/jwoertink/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ankane/searchkick/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-26T17:22:26Z","updated_at":"2016-07-26T18:01:52Z","closed_at":"2016-07-26T18:01:52Z","body":"I have this model `Member` with an `email` field. This one particular record has an email address of `testmail19@email.com`. \r\n\r\nThis doesn't work\r\n```ruby\r\nMember.search(\"TESTMAIL\", per_page: 100).total_count #=> 0\r\n```\r\n\r\nThis one does\r\n```ruby\r\nMember.search(\"TESTMAIL19\", per_page: 100).total_count #=> 1\r\n```\r\n\r\nHere's my model\r\n\r\n```ruby\r\nclass Member < ActiveRecord::Base\r\n  searchkick({\r\n    word_start: [:name, :email],\r\n    merge_mappings: true,\r\n    mappings: {\r\n      member: {\r\n        properties: {\r\n          name: {type: \"string\" analyzer: \"simple\"},\r\n          email: {type: \"string\" analyzer: \"simple\"}\r\n        }\r\n      }\r\n    }\r\n  })\r\nend\r\n```\r\n\r\nIs there some sort of option where the query has to be a certain length to match or something?"},"comment":{"url":"https://api.github.com/repos/ankane/searchkick/issues/comments/235352751","html_url":"https://github.com/ankane/searchkick/issues/706#issuecomment-235352751","issue_url":"https://api.github.com/repos/ankane/searchkick/issues/706","id":235352751,"user":{"login":"jwoertink","id":2391,"avatar_url":"https://avatars.githubusercontent.com/u/2391?v=3","gravatar_id":"","url":"https://api.github.com/users/jwoertink","html_url":"https://github.com/jwoertink","followers_url":"https://api.github.com/users/jwoertink/followers","following_url":"https://api.github.com/users/jwoertink/following{/other_user}","gists_url":"https://api.github.com/users/jwoertink/gists{/gist_id}","starred_url":"https://api.github.com/users/jwoertink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwoertink/subscriptions","organizations_url":"https://api.github.com/users/jwoertink/orgs","repos_url":"https://api.github.com/users/jwoertink/repos","events_url":"https://api.github.com/users/jwoertink/events{/privacy}","received_events_url":"https://api.github.com/users/jwoertink/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T18:01:52Z","updated_at":"2016-07-26T18:01:52Z","body":"hmm... yeah, still same result. I think I'll try and reproduce outside of my app to make sure it's not something weird going on there. Thanks for the help. I'll close this for now until I can get an exact error. "}}
{"actor":{"display_login":"jwoertink"}}