Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version num & index faq #85

Merged
merged 1 commit into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -88,3 +88,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