{"id":20459769,"url":"https://github.com/rosbit/trie-server","last_synced_at":"2026-04-20T07:05:03.818Z","repository":{"id":144249509,"uuid":"405043678","full_name":"rosbit/trie-server","owner":"rosbit","description":"A service to maintain keywords and find keywords in a given text","archived":false,"fork":false,"pushed_at":"2022-04-09T02:41:37.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-08T15:53:08.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rosbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-10T10:33:41.000Z","updated_at":"2022-04-09T02:41:40.000Z","dependencies_parsed_at":"2023-05-29T06:00:34.338Z","dependency_job_id":null,"html_url":"https://github.com/rosbit/trie-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rosbit/trie-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Ftrie-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Ftrie-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Ftrie-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Ftrie-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rosbit","download_url":"https://codeload.github.com/rosbit/trie-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosbit%2Ftrie-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32036803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-15T12:17:13.658Z","updated_at":"2026-04-20T07:05:03.785Z","avatar_url":"https://github.com/rosbit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Trie Server API\n\n使用Trie树完成关键词维护和文本搜索。\n\n### 接口说明\n\n#### 1. 增加关键词\n\n- 路由: `POST` /append\n- Content-Type: application/json\n- BODY\n  \n  ```json\n  {\n      \"key\": \"关键词\",\n      \"meta\": JSON // 可选，任意的一个 JSON\n  }\n  ```\n- 成功返回\n  \n  ```json\n  {\n     \"code\": 200,\n     \"msg\": \"OK\"\n  }\n  ```\n\n#### 2. 删除关键词\n\n- 路由: `DELETE` /del/_关键词_\n- 成功返回\n  \n  ```json\n  {\n     \"code\": 200,\n     \"msg\": \"OK\"\n  }\n  ```\n\n#### 3. 查询文本中出现的关键词\n\n- 路由: `POST` /search\n- Content-Type: application/json\n- BODY\n  \n  ```json\n  {\n      \"text\": \"任意文本\"\n  }\n  ```\n- 成功返回\n  \n  ```json\n  {\n     \"code\": 200,\n     \"msg\": \"OK\",\n     \"result\": {\n        \"关键词1\": {\n           \"count\": 1, // 出现次数\n           \"meta\": JSON // append关键词时候给定的meta，如果没有给返回 null\n        },\n        \"关键词2\" {\n           \"count\": 2,\n           \"meta\": JSON\n        }\n     }\n  }\n  ```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosbit%2Ftrie-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frosbit%2Ftrie-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosbit%2Ftrie-server/lists"}