示例工程 63-sessions-search-and-ship
63-sessions-search-and-ship/demo-01-session-search/README.md
# demo-01-session-search
会话搜索打分:标题 +10、标签 +6、每条命中消息 +3,按分数降序。
## 运行
```bash
pnpm --filter @tutorial/63-sessions-search-and-ship-demo-01-session-search start
```
## 验证
```bash
pnpm --filter @tutorial/63-sessions-search-and-ship-demo-01-session-search smoke
# {"evt":"smoke","ok":true,"hits":[{"id":"s1","score":16},{"id":"s2","score":3}],...}
```
## 说明
- 标题命中优先于消息命中,符合用户预期。
- 同一消息多次出现只算一次。
- 空查询返回空,不做“全量列表”。
## 已知限制
- 不支持分词与同义词,中文按子串匹配。
- 不做高亮,示例只返回分数。