{"id":19494781,"url":"https://github.com/ceejbot/npm-scored-search","last_synced_at":"2026-05-13T08:31:37.492Z","repository":{"id":32596854,"uuid":"36180695","full_name":"ceejbot/npm-scored-search","owner":"ceejbot","description":"an experiment in using norch/search-index for searching npm modules","archived":false,"fork":false,"pushed_at":"2015-05-25T15:02:47.000Z","size":220,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-24T03:56:39.547Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ceejbot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-24T16:13:11.000Z","updated_at":"2020-09-12T13:44:06.000Z","dependencies_parsed_at":"2022-08-26T11:50:28.072Z","dependency_job_id":null,"html_url":"https://github.com/ceejbot/npm-scored-search","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceejbot%2Fnpm-scored-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceejbot%2Fnpm-scored-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceejbot%2Fnpm-scored-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceejbot%2Fnpm-scored-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ceejbot","download_url":"https://codeload.github.com/ceejbot/npm-scored-search/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240740258,"owners_count":19849915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T21:33:13.609Z","updated_at":"2026-05-13T08:31:37.450Z","avatar_url":"https://github.com/ceejbot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npm-scored-search AKA scorch\n\nThree components:\n\n1. A pluggable backend for [registry-follower](https://github.com/npm/registry-follower) that stores data in a sharded norch [search-index](https://github.com/fergiemcdowall/search-index) instead of elasticsearch.\n2. An adapter for a norch [search-index](https://github.com/fergiemcdowall/search-index) that exposes a simplified npm-centric api for use by...\n3. A restify server that exposes a query interface. This first searches by keywords using norch, then, if given an npm user, re-weights package scores using the package.json social graph.\n\n![Coverage](http://img.shields.io/badge/coverage-86%25-yellow.svg?style=flat)\n[![Travis](http://img.shields.io/travis/ceejbot/npm-scored-search.svg?style=flat)](https://travis-ci.org/ceejbot/npm-scored-search)\n\n## Requirements\n\n* write access to the norch search index path, with sufficient space\n* probably redis for caching personalized scores (eventually)\n* probably some kind of tls termination in front\n\n## npm script targets\n\n* `start`: start the service; appropriate for production environments\n* `dev`: start the service with pretty-printed console logging \u0026 NODE_ENV=dev\n* `test`: run tests\n* `lint`: run jshint against source files\n* `test-travis`: run jshint as well as tests, and enforce some minimum coverage\n* `logtail`: tail production logs through a pretty-printer\n* `repl`: connect to the repl socket with the default name (socket uses the node name so this *should* be different in production; correct socket name is logged at start)\n\n## backend for registry-follower\n\nTBD\n\nRequires the URI for a running query server as configuration.\n\n(TODO: open-source registry-follower, which is probably of general use once npm-specific backends are stripped out)\n\n## adapter\n\nTBD\n\nUsed by the server to wrap the search-index api in a convenient way.\n\n## server\n\n### API exposed\n\nAll endpoints expect and respond with json.\n\n* `POST /package`: add a package to the search index; body must be json\n* `DELETE /package:id`: remove a package from the search index\n* `GET /matches/:prefix`: respond with an array of package names that start with the prefix\n* `GET /search/:terms`: uri-encoded search term string is turned into a query; response is an array of packages that match somehow\n\n### Configuration\n\n```\nUsage: scorch --name scorch-1 --listen localhost:5555 --redis http://localhost:\n6379\n\nOptions:\n  -n, --name     node name for metrics \u0026 logging             [default: \"scorch\"]\n  -l, --listen   host:port pair to listen on         [default: \"localhost:5757\"]\n  -r, --redis    host:port pair for redis     [default: \"http://localhost:6379\"]\n  -i, --index    path for norch index file                    [default: \"norch\"]\n  -m, --metrics  numbat metrics URI; optional\n  --help         Show help                                             [boolean]\n```\n\n### monitoring hooks\n\nTODO: open-source restify-monitor, which doesn't do much of anything special or sekrit. (It's now published as `@ceejbot/restify-monitor` as a temp hack.)\n\n* `/_monitor/ping`: responds with 200 'pong' if up\n* `/_monitor/status`: responds with 200 and a json object with PID \u0026 memory usage information\n\nAlso creates a repl. Location of repl socket is logged at start.\n\n### metrics\n\nThe query proxy emits the following metrics:\n\n* `scorch.start`: `'pid': process.pid`\n* `scorch.latency`: `'value': latency`: on each request served, how long it took\n\n## LICENCE\n\nISC.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceejbot%2Fnpm-scored-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceejbot%2Fnpm-scored-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceejbot%2Fnpm-scored-search/lists"}