{"action":"created","issue":{"url":"https://api.github.com/repos/D-Programming-Language/dub-registry/issues/86","labels_url":"https://api.github.com/repos/D-Programming-Language/dub-registry/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/D-Programming-Language/dub-registry/issues/86/comments","events_url":"https://api.github.com/repos/D-Programming-Language/dub-registry/issues/86/events","html_url":"https://github.com/D-Programming-Language/dub-registry/issues/86","id":51406330,"number":86,"title":"Would be nice to have a \"search\" feature","user":{"login":"grogancolin","id":4712786,"avatar_url":"https://avatars.githubusercontent.com/u/4712786?v=3","gravatar_id":"","url":"https://api.github.com/users/grogancolin","html_url":"https://github.com/grogancolin","followers_url":"https://api.github.com/users/grogancolin/followers","following_url":"https://api.github.com/users/grogancolin/following{/other_user}","gists_url":"https://api.github.com/users/grogancolin/gists{/gist_id}","starred_url":"https://api.github.com/users/grogancolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grogancolin/subscriptions","organizations_url":"https://api.github.com/users/grogancolin/orgs","repos_url":"https://api.github.com/users/grogancolin/repos","events_url":"https://api.github.com/users/grogancolin/events{/privacy}","received_events_url":"https://api.github.com/users/grogancolin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-12-09T09:43:29Z","updated_at":"2015-02-19T13:41:16Z","closed_at":null,"body":"It would be good to have a REST api for searching for packages on the registry.\r\n\r\nSomething like\r\n/search?id-like=\"searchString\"\r\n\r\nAnd the service would return JSON with all packages in the registry that are close to \"searchString\".\r\n\r\nThis could be done with MongoConnector and ElasticSearch \r\n(Info here -> http://blog.mongodb.org/post/95839709598/how-to-perform-fuzzy-matching-with-mongo-connector)."},"comment":{"url":"https://api.github.com/repos/D-Programming-Language/dub-registry/issues/comments/75053156","html_url":"https://github.com/D-Programming-Language/dub-registry/issues/86#issuecomment-75053156","issue_url":"https://api.github.com/repos/D-Programming-Language/dub-registry/issues/86","id":75053156,"user":{"login":"grogancolin","id":4712786,"avatar_url":"https://avatars.githubusercontent.com/u/4712786?v=3","gravatar_id":"","url":"https://api.github.com/users/grogancolin","html_url":"https://github.com/grogancolin","followers_url":"https://api.github.com/users/grogancolin/followers","following_url":"https://api.github.com/users/grogancolin/following{/other_user}","gists_url":"https://api.github.com/users/grogancolin/gists{/gist_id}","starred_url":"https://api.github.com/users/grogancolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grogancolin/subscriptions","organizations_url":"https://api.github.com/users/grogancolin/orgs","repos_url":"https://api.github.com/users/grogancolin/repos","events_url":"https://api.github.com/users/grogancolin/events{/privacy}","received_events_url":"https://api.github.com/users/grogancolin/received_events","type":"User","site_admin":false},"created_at":"2015-02-19T13:41:16Z","updated_at":"2015-02-19T13:41:16Z","body":"I think a REST interface would be more suited to this also. \r\n\r\nThe use case for this was more on the dub end to print to the end user something like:\r\n```\r\nyou entered  :  Close matches\r\ndubb             :   [ dub, dub-registry ]\r\nvibed             :  [ vibe-d ]\r\n```\r\n(Apologies for poor formatting)\r\n\r\nTo do that I need to keep track of what query string is close to what packages. That's what the json[str] is for. Passing all query strings at once into searchPackages() wont let me keep track of this..\r\n\r\nMaybe re-doing (or making an overload) of searchPackages that takes in a Json and returns a Json object constructed like the above?\r\n\r\nObviously, this will all need to be re-worked when elastic search is used, maybe it'd be better to go and implement that now rather than later?"}}