{"id":20847372,"url":"https://github.com/zingerlittlebee/search-demo","last_synced_at":"2026-04-19T20:34:56.214Z","repository":{"id":251305757,"uuid":"837001331","full_name":"ZingerLittleBee/search-demo","owner":"ZingerLittleBee","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-29T11:13:07.000Z","size":2085,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-20T13:58:49.768Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/ZingerLittleBee.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-02T02:27:49.000Z","updated_at":"2024-08-29T11:13:11.000Z","dependencies_parsed_at":"2025-12-24T20:03:40.824Z","dependency_job_id":null,"html_url":"https://github.com/ZingerLittleBee/search-demo","commit_stats":null,"previous_names":["zingerlittlebee/search-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ZingerLittleBee/search-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZingerLittleBee%2Fsearch-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZingerLittleBee%2Fsearch-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZingerLittleBee%2Fsearch-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZingerLittleBee%2Fsearch-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZingerLittleBee","download_url":"https://codeload.github.com/ZingerLittleBee/search-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZingerLittleBee%2Fsearch-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32022340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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-18T02:19:46.569Z","updated_at":"2026-04-19T20:34:56.189Z","avatar_url":"https://github.com/ZingerLittleBee.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Search Demo\n\n## 如何使用\n```bash\ndocker-compose up -d\n```\n访问 [http://localhost:3000](http://localhost:3000)\n\n\n## 如何开发\n### 启动 surreal db 服务\n```docker\ndocker-compose up -d\n```\n\n### 创建环境变量\n```shell\ncp .env.example .env\n```\n\n### 安装图片转提示词服务\n1. 安装 [ollama](https://ollama.com/)\n2. 安装 llava 模型，`ollama run llava`\n\n\n### 下载模型\n```shell\nbash scripts/download-models.sh\n```\n\n### mock 数据\n`scripts/mock.sh`\n\n## SurrealDB 使用示例\n```sql\n-- 创建一个 id 为 'text:aaa' 的 text 记录\n-- 并将返回值（id）存储到 $text 变量中\nLET $text = (CREATE text:aaa CONTENT {\n\tdata: 'vaaa',\n\tvector: [0.1,0.1,0.1]\n}).id;\n\n-- 创建一个 id 为 'text:aaa' 的 image 记录\n-- 并将返回值 (id) 存储到 $image 变量中\nLET $image = (CREATE image:bbb CONTENT {\n\turl: 'https://google.com',\n\tvector: [0.1,0.1,0.1],\n    prompt: 'a girl'\n}).id;\n\n-- 创建一个 id 为 item:1 的 item 记录\n-- 并将 $text $image 作为 record\nCREATE item:1 CONTENT {\n    text: $text,\n    image: $image\n};\n\n-- 创建一个 text 和 image record 为空的 item 记录\nCREATE item:2 CONTENT {\n    text: [],\n    image: []\n};\n\n-- 创建 \"包含\" 关联\n-- item:1 包含 text:aaa, image:bbb\nRELATE item:1-\u003econtains-\u003e[text:aaa, image:bbb];\n\n-- 常规 sql 查询\nSELECT * from item:1;\n\n-- 关联查询，正向\n-- 查询 item:1 包含的 image 记录\nSELECT -\u003econtains-\u003eimage from item:1;\n-- 查询 item:1 包含的 text 记录\nSELECT -\u003econtains-\u003etext from item:1;\n\n-- 反向查询，反向\n-- 查询包含 text:aaa 的 item\nSELECT \u003c-contains\u003c-item from text:aaa;\n-- 查询包含 image:bbb 的 item\nSELECT \u003c-contains\u003c-item from image:bbb;\n\n-- 常规 sql 查询\n-- [\n-- \t{\n-- \t\tid: item:1\n-- \t}\n-- ]\nSELECT id FROM item;\n\n-- VALUE 关键字查询\n-- [\n-- \titem:1\n-- ]\nSELECT VALUE id FROM item;\n\n-- 包含 record 记录的查询\n-- SELECT * FROM item:1 FETCH text, image;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzingerlittlebee%2Fsearch-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzingerlittlebee%2Fsearch-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzingerlittlebee%2Fsearch-demo/lists"}