Skip to content

Commit

Permalink
version num & index faq (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amber1990Zhang committed Sep 23, 2020
1 parent 37adc01 commit 73a99ff
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/manual-CN/0.about-this-manual.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 关于本手册

此手册为 **Nebula Graph** 的用户手册,版本为 1.0。详细版本更新信息参见 [Release Notes](https://github.com/vesoft-inc/nebula/releases)
此手册为 **Nebula Graph** 的用户手册,版本为 1.1。详细版本更新信息参见 [Release Notes](https://github.com/vesoft-inc/nebula/releases)

## 面向的读者

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,36 @@ GO FROM $-.DstVID OVER serve YIELD $-.DstVID, serve.start_year, serve.end_year,
| 105 | 2018 | 2019 | Raptors |
----------------------------------------------------------------
```

## FAQ

### 错误码 411

```bash
[ERROR (-8)]: Unknown error(411):
```

错误码 `411` 表明针对当前 `WHERE` 过滤条件,没有找到有效的索引。Nebula Graph 采用左匹配模式对索引进行选择,即 `WHERE` 过滤条件中的列必须在索引的前 N 列。例如:

```ngql
nebula> CREATE TAG INDEX example_index ON TAG t(p1, p2, p3); -- 对一个标签的前 3 个属性创建索引
nebula> LOOKUP ON t WHERE p2 == 1 and p3 == 1; -- 不支持
nebula> LOOKUP ON t WHERE p1 == 1; -- 支持
nebula> LOOKUP ON t WHERE p1 == 1 and p2 == 1; -- 支持
nebula> LOOKUP ON t WHERE p1 == 1 and p2 == 1 and p3 == 1; -- 支持
```

### 找不到有效索引

```bash
No valid index found
```

如果查询条件包含字符串类型的字段,那么 Nebula Graph 会选择匹配所有字段的索引。例如:

```ngql
nebula> CREATE TAG t1 (c1 string, c2 int);
nebula> CREATE TAG INDEX i1 ON t1 (c1, c2);
nebula> LOOKUP ON t1 WHERE t1.c1 == "a"; -- 索引 i1 无效
nebula> LOOKUP ON t1 WHERE t1.c1 == "a" and t1.c2 == 1; -- 索引 i1 有效
```
1 change: 1 addition & 0 deletions docs/manual-CN/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Manual Changes

* 0.2.0 - 1.1
* 0.1.9 - 1.0
* 0.1.8 - 1.0 RC4
* 0.1.7 - 1.0 RC3
Expand Down

0 comments on commit 73a99ff

Please sign in to comment.