{"action":"created","issue":{"url":"https://api.github.com/repos/hypothesis/h/issues/2153","repository_url":"https://api.github.com/repos/hypothesis/h","labels_url":"https://api.github.com/repos/hypothesis/h/issues/2153/labels{/name}","comments_url":"https://api.github.com/repos/hypothesis/h/issues/2153/comments","events_url":"https://api.github.com/repos/hypothesis/h/issues/2153/events","html_url":"https://github.com/hypothesis/h/issues/2153","id":67395710,"number":2153,"title":"False positives for tag search","user":{"login":"gergely-ujvari","id":2094134,"avatar_url":"https://avatars.githubusercontent.com/u/2094134?v=3","gravatar_id":"","url":"https://api.github.com/users/gergely-ujvari","html_url":"https://github.com/gergely-ujvari","followers_url":"https://api.github.com/users/gergely-ujvari/followers","following_url":"https://api.github.com/users/gergely-ujvari/following{/other_user}","gists_url":"https://api.github.com/users/gergely-ujvari/gists{/gist_id}","starred_url":"https://api.github.com/users/gergely-ujvari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gergely-ujvari/subscriptions","organizations_url":"https://api.github.com/users/gergely-ujvari/orgs","repos_url":"https://api.github.com/users/gergely-ujvari/repos","events_url":"https://api.github.com/users/gergely-ujvari/events{/privacy}","received_events_url":"https://api.github.com/users/gergely-ujvari/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-04-09T16:12:28Z","updated_at":"2016-02-10T17:03:02Z","closed_at":"2016-02-10T15:31:02Z","body":"1. Let's make a [search for the tag](https://api.hypothes.is/search?tags=piga-1) `piga-1` \r\n2. The result is 8 annotations, however some of them doesn't have this tag.\r\nI.e. annotation [wGLvONWRTHilnSeyOXQ5Ew](https://hypothes.is/api/annotations/wGLvONWRTHilnSeyOXQ5Ew) has only two tags: `unidad 1` and `unidad 4` \r\n\r\nThis is because for tags we use the icu_normalizer analyzer which tokenizes the tags into words, and it tokenizes `piga-1` into `piga` and `1` and it tokenizes `unidad 1` into `unidad` and `1`.\r\nAnd the `1` token is a match.\r\n\r\nOne possible solution is to add a new tag analyzer something like this:\r\n```\r\n            'tags': {\r\n                'tokenizer': 'keyword',\r\n                'filter': ['icu_folding', 'lowercase']\r\n            }\r\n\r\n``` "},"comment":{"url":"https://api.github.com/repos/hypothesis/h/issues/comments/182481575","html_url":"https://github.com/hypothesis/h/issues/2153#issuecomment-182481575","issue_url":"https://api.github.com/repos/hypothesis/h/issues/2153","id":182481575,"user":{"login":"judell","id":46509,"avatar_url":"https://avatars.githubusercontent.com/u/46509?v=3","gravatar_id":"","url":"https://api.github.com/users/judell","html_url":"https://github.com/judell","followers_url":"https://api.github.com/users/judell/followers","following_url":"https://api.github.com/users/judell/following{/other_user}","gists_url":"https://api.github.com/users/judell/gists{/gist_id}","starred_url":"https://api.github.com/users/judell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/judell/subscriptions","organizations_url":"https://api.github.com/users/judell/orgs","repos_url":"https://api.github.com/users/judell/repos","events_url":"https://api.github.com/users/judell/events{/privacy}","received_events_url":"https://api.github.com/users/judell/received_events","type":"User","site_admin":false},"created_at":"2016-02-10T17:03:02Z","updated_at":"2016-02-10T17:03:02Z","body":"\"The bug as described in the original message no longer exists\"\r\n\r\nI did not realize that was fixed. Excellent!\r\n\r\nI notice we still have:\r\n\r\nhttps://hypothes.is/stream?q=tags:piga-1 -> many results\r\n\r\nHowever I think I see what's gone wrong there, will file separately.\r\n"}}