控制台概览 #
登录控制台 #
访问 Algolia Dashboard 并使用账号登录。
控制台首页 #
概览面板 #
登录后首先看到的是应用概览:
text
┌─────────────────────────────────────────────────────────────┐
│ Application: My App [Settings] │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Records │ │ Requests │ │ Users │ │ Latency │ │
│ │ 10,234 │ │ 1.2M │ │ 45,678 │ │ 12ms │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Search Analytics Chart │ │
│ │ (搜索量、无结果率、点击率趋势图) │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
关键指标 #
| 指标 | 说明 |
|---|---|
| Records | 索引中的记录总数 |
| Requests | API请求次数 |
| Users | 活跃用户数 |
| Latency | 平均响应延迟 |
主要功能模块 #
1. 索引管理 (Indices) #
索引列表 #
text
Indices 页面显示:
- 索引名称
- 记录数量
- 最后更新时间
- 索引大小
索引操作 #
| 操作 | 说明 |
|---|---|
| Browse | 浏览索引数据 |
| Search | 测试搜索功能 |
| Settings | 配置索引设置 |
| Clear | 清空索引数据 |
| Delete | 删除索引 |
浏览数据 #
点击索引名称进入浏览模式:
text
┌─────────────────────────────────────────────────┐
│ Browse: products │
├─────────────────────────────────────────────────┤
│ Search: [________________] [Search] │
├─────────────────────────────────────────────────┤
│ objectID: 1 │
│ name: iPhone 15 Pro │
│ brand: Apple │
│ price: 999 │
│ ───────────────────────────────────────────── │
│ objectID: 2 │
│ name: Samsung Galaxy S24 │
│ brand: Samsung │
│ price: 799 │
└─────────────────────────────────────────────────┘
2. 搜索测试 (Search) #
搜索控制台 #
在索引页面点击"Search"标签:
javascript
// 搜索输入框
Query: [iphone___________]
// 搜索参数
{
"hitsPerPage": 20,
"page": 0,
"facets": ["*"]
}
// 搜索结果
{
"hits": [...],
"nbHits": 5,
"processingTimeMS": 1
}
参数测试 #
可以实时测试各种搜索参数:
| 参数 | 说明 |
|---|---|
| query | 搜索关键词 |
| filters | 过滤条件 |
| facets | 分面字段 |
| hitsPerPage | 每页数量 |
| page | 页码 |
3. 索引设置 (Settings) #
基本设置 #
text
Searchable Attributes
├── name (ordered)
├── description
└── brand
Attributes for Faceting
├── brand (filterOnly)
├── category
└── price
排名设置 #
text
Ranking Formula
├── typo
├── geo
├── words
├── filters
├── proximity
├── attribute
├── exact
└── custom
Custom Ranking
├── desc(rating)
└── desc(popularity)
可搜索属性配置 #
json
{
"searchableAttributes": [
"name", // 最高优先级
"description", // 中等优先级
"brand" // 较低优先级
]
}
4. 分析报告 (Analytics) #
搜索分析 #
text
┌─────────────────────────────────────────────────┐
│ Search Analytics (Last 7 days) │
├─────────────────────────────────────────────────┤
│ │
│ Total Searches: 125,000 │
│ Unique Searches: 45,000 │
│ No Results Rate: 5.2% │
│ Average Click Position: 2.3 │
│ │
│ Top Searches: │
│ 1. "iphone" - 12,000 searches │
│ 2. "samsung" - 8,500 searches │
│ 3. "laptop" - 6,200 searches │
│ │
│ No Results Searches: │
│ 1. "pixel" - 2,100 searches │
│ 2. "xiaomi" - 1,800 searches │
│ │
└─────────────────────────────────────────────────┘
关键指标 #
| 指标 | 说明 | 理想值 |
|---|---|---|
| Total Searches | 总搜索次数 | - |
| No Results Rate | 无结果率 | < 5% |
| Click Through Rate | 点击率 | > 30% |
| Average Click Position | 平均点击位置 | < 3 |
5. API密钥管理 (API Keys) #
密钥列表 #
text
┌─────────────────────────────────────────────────┐
│ API Keys │
├─────────────────────────────────────────────────┤
│ Application ID: ABC123DEF456 │
│ │
│ Search-Only API Key: │
│ a1b2c3d4e5f6g7h8i9j0 │
│ [Copy] [Regenerate] │
│ │
│ Admin API Key: │
│ x1y2z3a4b5c6d7e8f9g0 │
│ [Copy] [Regenerate] │
│ │
│ + Create API Key │
└─────────────────────────────────────────────────┘
创建自定义密钥 #
javascript
// 创建受限API Key
{
"description": "Read-only key for products index",
"acl": ["search"],
"indices": ["products"],
"validity": 31536000, // 1年有效期
"maxQueriesPerIPPerHour": 1000
}
6. 日志监控 (Logs) #
API日志 #
text
┌─────────────────────────────────────────────────┐
│ API Logs │
├─────────────────────────────────────────────────┤
│ Time: 2024-03-28 10:30:45 │
│ Method: POST │
│ URL: /1/indexes/products/query │
│ Query: {"query":"iphone"} │
│ Response Time: 12ms │
│ Status: 200 │
│ ───────────────────────────────────────────── │
│ Time: 2024-03-28 10:30:44 │
│ Method: POST │
│ URL: /1/indexes/products/batch │
│ Body: {"requests":[...]} │
│ Response Time: 45ms │
│ Status: 200 │
└─────────────────────────────────────────────────┘
日志筛选 #
| 筛选条件 | 说明 |
|---|---|
| Method | HTTP方法 |
| Index | 索引名称 |
| Status | 响应状态码 |
| Time Range | 时间范围 |
7. 团队管理 (Team) #
成员列表 #
text
┌─────────────────────────────────────────────────┐
│ Team Members │
├─────────────────────────────────────────────────┤
│ admin@example.com │
│ Role: Owner │
│ Last active: Now │
│ ───────────────────────────────────────────── │
│ developer@example.com │
│ Role: Developer │
│ Last active: 2 hours ago │
│ │
│ + Invite Team Member │
└─────────────────────────────────────────────────┘
8. 计费管理 (Billing) #
使用统计 #
text
┌─────────────────────────────────────────────────┐
│ Current Plan: Grow │
├─────────────────────────────────────────────────┤
│ │
│ Records: 50,000 / 100,000 (50%) │
│ ████████████████░░░░░░░░░░░░░░░░░░░░ │
│ │
│ Requests: 800,000 / 1,000,000 (80%) │
│ ████████████████████████████░░░░░░░░ │
│ │
│ Next billing date: April 1, 2024 │
│ Estimated cost: $150 │
│ │
└─────────────────────────────────────────────────┘
实用技巧 #
快速测试搜索 #
- 进入索引页面
- 点击"Search"标签
- 输入查询词
- 查看实时结果
调试排名问题 #
- 使用搜索测试功能
- 查看
_rankingInfo字段 - 分析各排名因素得分
json
{
"_rankingInfo": {
"nbTypos": 0,
"firstMatchedWord": 0,
"proximityDistance": 1,
"userScore": 100,
"geoDistance": 0,
"geoPrecision": 1,
"nbExactWords": 1,
"words": 1
}
}
监控异常 #
- 定期检查"No Results"搜索
- 关注响应时间变化
- 查看错误日志
总结 #
Algolia控制台提供了丰富的管理和监控功能:
| 功能 | 用途 |
|---|---|
| Indices | 索引数据管理 |
| Search | 搜索测试调试 |
| Settings | 索引配置 |
| Analytics | 数据分析 |
| API Keys | 密钥管理 |
| Logs | 日志监控 |
| Team | 团队协作 |
| Billing | 计费管理 |
接下来,让我们深入学习 索引概念。
最后更新:2026-03-28