{"action":"created","issue":{"url":"https://api.github.com/repos/rubygems/rubygems.org/issues/972","labels_url":"https://api.github.com/repos/rubygems/rubygems.org/issues/972/labels{/name}","comments_url":"https://api.github.com/repos/rubygems/rubygems.org/issues/972/comments","events_url":"https://api.github.com/repos/rubygems/rubygems.org/issues/972/events","html_url":"https://github.com/rubygems/rubygems.org/issues/972","id":83197719,"number":972,"title":"Search API not returning exact matches for some queries","user":{"login":"Kapeli","id":1445635,"avatar_url":"https://avatars.githubusercontent.com/u/1445635?v=3","gravatar_id":"","url":"https://api.github.com/users/Kapeli","html_url":"https://github.com/Kapeli","followers_url":"https://api.github.com/users/Kapeli/followers","following_url":"https://api.github.com/users/Kapeli/following{/other_user}","gists_url":"https://api.github.com/users/Kapeli/gists{/gist_id}","starred_url":"https://api.github.com/users/Kapeli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kapeli/subscriptions","organizations_url":"https://api.github.com/users/Kapeli/orgs","repos_url":"https://api.github.com/users/Kapeli/repos","events_url":"https://api.github.com/users/Kapeli/events{/privacy}","received_events_url":"https://api.github.com/users/Kapeli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rubygems/rubygems.org/labels/starter","name":"starter","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-31T21:44:07Z","updated_at":"2015-09-06T15:09:31Z","closed_at":null,"body":"The Search API doesn't return exact matches for some queries. As far as I can tell, it happens with queries that have a small length.\r\n\r\nFor example, if you search for `ib`, the `ib` gem is not part of the search results:\r\n\r\nhttps://rubygems.org/api/v1/search.json?query=ib"},"comment":{"url":"https://api.github.com/repos/rubygems/rubygems.org/issues/comments/138092018","html_url":"https://github.com/rubygems/rubygems.org/issues/972#issuecomment-138092018","issue_url":"https://api.github.com/repos/rubygems/rubygems.org/issues/972","id":138092018,"user":{"login":"ETetzlaff","id":3970630,"avatar_url":"https://avatars.githubusercontent.com/u/3970630?v=3","gravatar_id":"","url":"https://api.github.com/users/ETetzlaff","html_url":"https://github.com/ETetzlaff","followers_url":"https://api.github.com/users/ETetzlaff/followers","following_url":"https://api.github.com/users/ETetzlaff/following{/other_user}","gists_url":"https://api.github.com/users/ETetzlaff/gists{/gist_id}","starred_url":"https://api.github.com/users/ETetzlaff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ETetzlaff/subscriptions","organizations_url":"https://api.github.com/users/ETetzlaff/orgs","repos_url":"https://api.github.com/users/ETetzlaff/repos","events_url":"https://api.github.com/users/ETetzlaff/events{/privacy}","received_events_url":"https://api.github.com/users/ETetzlaff/received_events","type":"User","site_admin":false},"created_at":"2015-09-06T15:09:31Z","updated_at":"2015-09-06T15:09:31Z","body":"It's possible that the production db is doing something, but the query isn't necessarily all that glamorous or complicated so I doubt that a prod db setting is the case here.  After reviewing the logic around it, the only explanation I could have is this (assuming the exact same logic is implemented in prod).\r\n\r\nThe query logic has a base clause that returns 'ib' in this case, however, there is another stipulation.  The version of that record HAS to be indexed.  If for whatever reason when the gem was created in the prod environment is not indexed, it will not return.  I'm not 100% on the logic surrounding gem creation yet though."}}