{"action":"created","issue":{"url":"https://api.github.com/repos/harvesthq/chosen/issues/1483","labels_url":"https://api.github.com/repos/harvesthq/chosen/issues/1483/labels{/name}","comments_url":"https://api.github.com/repos/harvesthq/chosen/issues/1483/comments","events_url":"https://api.github.com/repos/harvesthq/chosen/issues/1483/events","html_url":"https://github.com/harvesthq/chosen/pull/1483","id":18181544,"number":1483,"title":"Use word boundary matching","user":{"login":"pfiller","id":545995,"avatar_url":"https://avatars.githubusercontent.com/u/545995?v=3","gravatar_id":"","url":"https://api.github.com/users/pfiller","html_url":"https://github.com/pfiller","followers_url":"https://api.github.com/users/pfiller/followers","following_url":"https://api.github.com/users/pfiller/following{/other_user}","gists_url":"https://api.github.com/users/pfiller/gists{/gist_id}","starred_url":"https://api.github.com/users/pfiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfiller/subscriptions","organizations_url":"https://api.github.com/users/pfiller/orgs","repos_url":"https://api.github.com/users/pfiller/repos","events_url":"https://api.github.com/users/pfiller/events{/privacy}","received_events_url":"https://api.github.com/users/pfiller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2013-08-16T22:13:41Z","updated_at":"2015-08-05T23:32:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/harvesthq/chosen/pulls/1483","html_url":"https://github.com/harvesthq/chosen/pull/1483","diff_url":"https://github.com/harvesthq/chosen/pull/1483.diff","patch_url":"https://github.com/harvesthq/chosen/pull/1483.patch"},"body":"@harvesthq/chosen-developers \r\n\r\nThis is a new PR for @koenpunt's excellent #1465. In his words:\r\n\r\n> By making use of word boundary matching (http://www.regular-expressions.info/wordboundaries.html) the split word search is much cleaner (no more actual splitting of strings), and the search results are better.\r\n\r\nI want to be very careful about merging this in, but I'm loving what I see so far. With default options set:\r\n\r\n<table>\r\n<tr>\r\n  <th>Search String</th>\r\n  <th>Expected to Match</th>\r\n  <th>Old way</th>\r\n  <th>New way</th>\r\n</tr>\r\n<tr>\r\n  <td>Democratic Republic of</td>\r\n  <td>Congo, The Democratic Republic of The</td>\r\n  <td>:poop:</td>\r\n  <td>:+1:</td>\r\n</tr>\r\n<tr>\r\n  <td>of America</td>\r\n  <td>United States (of America)</td>\r\n  <td>:poop:</td>\r\n  <td>:+1:</td>\r\n</tr>\r\n<tr>\r\n  <td>Holland</td>\r\n  <td>Netherlands/Holland</td>\r\n  <td>:poop:</td>\r\n  <td>:+1:</td>\r\n</tr>\r\n</table>\r\n\r\nHere's what I think we should do before this gets a final :shipit:\r\n\r\n- [ ] Add unit tests for verifying that search results are correct. To do this, we might need to break the actual search match function out of the winnow method.\r\n- [ ] Performance Test with 1000s of items (perhaps replacing test + match with a single match call)\r\n- [ ] Determine if we need to make an API change related to `enable_split_word_search` or `search_contains`. I don't think you should be able to turn off `enable_split_word_search` if `search_contains` is `true`, but I want to do some experimenting there.\r\n\r\nFixes #75 and #1463 "},"comment":{"url":"https://api.github.com/repos/harvesthq/chosen/issues/comments/128183470","html_url":"https://github.com/harvesthq/chosen/pull/1483#issuecomment-128183470","issue_url":"https://api.github.com/repos/harvesthq/chosen/issues/1483","id":128183470,"user":{"login":"alxndrmlr","id":579553,"avatar_url":"https://avatars.githubusercontent.com/u/579553?v=3","gravatar_id":"","url":"https://api.github.com/users/alxndrmlr","html_url":"https://github.com/alxndrmlr","followers_url":"https://api.github.com/users/alxndrmlr/followers","following_url":"https://api.github.com/users/alxndrmlr/following{/other_user}","gists_url":"https://api.github.com/users/alxndrmlr/gists{/gist_id}","starred_url":"https://api.github.com/users/alxndrmlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alxndrmlr/subscriptions","organizations_url":"https://api.github.com/users/alxndrmlr/orgs","repos_url":"https://api.github.com/users/alxndrmlr/repos","events_url":"https://api.github.com/users/alxndrmlr/events{/privacy}","received_events_url":"https://api.github.com/users/alxndrmlr/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T23:32:17Z","updated_at":"2015-08-05T23:32:17Z","body":"Agreed. I went with [select2](https://select2.github.io/)"}}