{"action":"created","issue":{"url":"https://api.github.com/repos/matehat/MHTextSearch/issues/5","repository_url":"https://api.github.com/repos/matehat/MHTextSearch","labels_url":"https://api.github.com/repos/matehat/MHTextSearch/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/matehat/MHTextSearch/issues/5/comments","events_url":"https://api.github.com/repos/matehat/MHTextSearch/issues/5/events","html_url":"https://github.com/matehat/MHTextSearch/issues/5","id":157997839,"number":5,"title":"Problem with white spaces","user":{"login":"computerion","id":1733224,"avatar_url":"https://avatars.githubusercontent.com/u/1733224?v=3","gravatar_id":"","url":"https://api.github.com/users/computerion","html_url":"https://github.com/computerion","followers_url":"https://api.github.com/users/computerion/followers","following_url":"https://api.github.com/users/computerion/following{/other_user}","gists_url":"https://api.github.com/users/computerion/gists{/gist_id}","starred_url":"https://api.github.com/users/computerion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/computerion/subscriptions","organizations_url":"https://api.github.com/users/computerion/orgs","repos_url":"https://api.github.com/users/computerion/repos","events_url":"https://api.github.com/users/computerion/events{/privacy}","received_events_url":"https://api.github.com/users/computerion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-01T20:20:15Z","updated_at":"2016-10-09T08:49:31Z","closed_at":null,"body":"I noticed that if I have \"Game of Thrones\" as part of the tagged strings in an index, and I search for \"Game \" (whitespace after \"Game\"), the results don't show the original \"Game of Thrones\" index. If I search for \"Game\" or \"Thrones\" it works perfectly fine. Is this expected behavior?"},"comment":{"url":"https://api.github.com/repos/matehat/MHTextSearch/issues/comments/252473611","html_url":"https://github.com/matehat/MHTextSearch/issues/5#issuecomment-252473611","issue_url":"https://api.github.com/repos/matehat/MHTextSearch/issues/5","id":252473611,"user":{"login":"mikecsh","id":268185,"avatar_url":"https://avatars.githubusercontent.com/u/268185?v=3","gravatar_id":"","url":"https://api.github.com/users/mikecsh","html_url":"https://github.com/mikecsh","followers_url":"https://api.github.com/users/mikecsh/followers","following_url":"https://api.github.com/users/mikecsh/following{/other_user}","gists_url":"https://api.github.com/users/mikecsh/gists{/gist_id}","starred_url":"https://api.github.com/users/mikecsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikecsh/subscriptions","organizations_url":"https://api.github.com/users/mikecsh/orgs","repos_url":"https://api.github.com/users/mikecsh/repos","events_url":"https://api.github.com/users/mikecsh/events{/privacy}","received_events_url":"https://api.github.com/users/mikecsh/received_events","type":"User","site_admin":false},"created_at":"2016-10-09T08:49:31Z","updated_at":"2016-10-09T08:49:31Z","body":"I've implemented @computerion's  workaround by replacing the whitespace with underscores in keywords and indexed strings and it works well as long as the search is identical to the underlying indexed string:\r\n\r\ne.g:\r\n\r\nString: \"Game of Thrones\" is indexed as \"Game_of_thrones\"\r\n\r\nSearch: \"Game of\" actually searches \"Game_of\" and so a match is returned\r\n\r\nWhich is a huge improvement on the default behaviour. However, searching for \"thrones game\" will return no results when most users are likely to expect this to work. Additionally this approach is likely to be more resource hungry in building and storing the index as every indexed string is effectively unique and the use of the stop word ignoring functionality is lost. Therefore I'll leave this issue open for now.\r\n\r\nThanks a lot for your suggestion @computerion at least I have something reasonably functional now!"}}
{"actor":{"display_login":"mikecsh"}}