bitflicker64 commented on code in PR #557:
URL: https://github.com/apache/hugegraph-doc/pull/557#discussion_r4435961140
##########
content/cn/docs/clients/client/hugegraph-client.md:
##########
@@ -1,18 +1,412 @@
---
title: "HugeGraph Java Client"
-linkTitle: "HugeGraph Java Client"
-weight: 2
+linkTitle: "Java 客户端"
+weight: 1
+aliases:
+ - /cn/docs/quickstart/client/hugegraph-client/
Review Comment:
R2 status at `01b8113f`: **fixed**. The CN aliases no longer have the `/cn`
prefix, a strict Hugo 0.168.0 build writes nothing under `public/cn/cn/`, and
the five old CN routes redirect to the new pages. `data/home/{en,cn}.yaml` now
links to `docs/clients/client/hugegraph-client/`.
##########
data/version_routes.json:
##########
@@ -1381,28 +1479,28 @@
"1.0": "docs/quickstart/"
},
"en:quickstart/client": {
- "latest": "docs/quickstart/client/",
+ "latest": null,
"1.7": "docs/quickstart/client/",
"1.5": "docs/quickstart/client/",
"1.3": "docs/quickstart/client/",
"1.0": "docs/quickstart/client/"
},
"en:quickstart/client/hugegraph-client": {
Review Comment:
R2 status at `01b8113f`: **fixed**. The equivalents group now includes all
three Java IDs, and the template and Python resolver agree for every ID and
version.
##########
content/en/docs/language/cypher-compatibility.md:
##########
@@ -0,0 +1,67 @@
+---
+title: "Cypher Compatibility"
+linkTitle: "Cypher Compatibility"
+weight: 3
+---
+
+### Scope and Overview
+
+HugeGraph executes openCypher 9 queries on top of the TinkerPop engine using
the
+[cypher-for-gremlin](https://github.com/opencypher/cypher-for-gremlin)
transpiler.
+This page summarizes supported request forms, parameter binding rules, syntax
coverage, and behavioral boundaries.
+
+The endpoint is `/graphspaces/{graphspace}/graphs/{graph}/cypher`. For query
examples and Gremlin equivalents, see the
+[HugeGraph Cypher Guide](/docs/language/hugegraph-cypher/).
+
+### Request Forms and Parameter Bindings
+
+| Request Form | Content-Type | Description |
+|---|---|---|
+| `POST` (Recommended) | `application/json` | JSON body `{"cypher": "...",
"parameters": {...}}`, supports parameter bindings |
+| `POST` | `application/json` | Raw Cypher text string body (for
unparameterized raw statements) |
+| `GET` | — | Query parameter `?cypher=<URL-encoded statement>`, suitable for
simple read queries |
+{.wide}
+
+Example JSON parameterized request:
+
+```json
+{
+ "cypher": "MATCH (n:person) WHERE n.name = $name RETURN n.name",
+ "parameters": {"name": "marko"}
+}
+```
+
+#### Parameter Binding Rules
+
+- **Parameter Format**: The `cypher` field must be a non-empty string;
`parameters`, if provided, must be a JSON object (omitted means an empty map).
+- **Parameter Count**: The top-level `parameters` object accepts at most 16
keys. For more properties, group them into a nested Map and reference fields
+ explicitly in the statement (e.g. `$props.name`).
+- **Unbound Variables**: Referencing an undeclared `$param` raises an
execution error and is rejected (explicit `null` is supported).
+- **Reserved Marker**: The exact string `" cypher.null"` (two leading spaces)
is reserved by the translator as an internal sentinel and is rejected in
+ parameter values.
+- **Error Response**: On validation or execution errors, the server returns
HTTP 400 (or `status.code` 400 with null result), with structured details
+ (`code`, `message`, `hint`) in `status.attributes.errors`.
+
+### Syntax and Feature Support Matrix
+
+| Category | Supported Features | Notes |
+|---|---|---|
+| Reads & Patterns | Label scans, equality and range predicates, boolean logic
(AND/OR/NOT), directed 1-hop and multi-hop patterns, regex matching (`=~` full
match) | Range comparisons require corresponding indexes |
+| Results & Projection | Node and scalar projections, aliases (`AS`), property
access, nested structures, relationship IDs, path expressions, null handling |
Results are mapped to standard JSON structures |
+| Aggregation & Ordering | `count`, `sum`, `min`, `max`, `avg`, `DISTINCT`,
`ORDER BY`, `SKIP`, `LIMIT` | Transpiled directly to Gremlin traversal steps |
+| Data Writes | Vertex and edge `CREATE`, property `SET` / `REMOVE`, edge and
vertex `DELETE` / `DETACH DELETE` | Create vertices with required properties
before creating connecting edges |
+{.wide}
+
+### Write Constraints and Considerations
+
+On schemas with non-nullable properties or `PRIMARY_KEY` strategy, the
shorthand `CREATE (a)-[:knows]->(b)` fails
+due to non-null property validation (`checkNonnullProperty`) or missing
primary keys.
+Execute vertex and edge creations separately, ensuring required vertex
attributes are fully specified.
+
+### Unsupported Features
+
+The following advanced features are not currently supported by the transpiler
layer; use Gremlin or the respective REST APIs:
+- **Complex Clauses**: `MERGE`, `OPTIONAL MATCH`, `WITH`, `UNWIND`, `UNION`,
variable-length paths (`*1..3`);
Review Comment:
R2 status at `01b8113f`: **fixed**. `OPTIONAL MATCH`, `WITH` and `UNWIND`
are no longer on the unsupported list (EN and CN). `MERGE`, `UNION` and
variable-length paths are still listed; no test covers them either way.
##########
content/en/docs/clients/client/hugegraph-client.md:
##########
@@ -81,7 +470,7 @@ The client also reports what the connected server supports,
so callers can branc
### 2 Schema
Review Comment:
R2 status at `01b8113f`: **numbering fixed**. The EN headings are 6, 7 and
8, the cross-reference says section 8, and group anchors such as
`{#22-propertykey}` are kept. The deep subsection anchors are followed up in
https://github.com/apache/hugegraph-doc/pull/557#discussion_r4435960379.
##########
content/en/docs/language/_index.md:
##########
@@ -1,7 +1,41 @@
---
-title: "Query Languages"
-linkTitle: "Query Languages"
+title: "Graph Query Languages"
+linkTitle: "Graph Query Languages"
weight: 7
---
-HugeGraph supports Gremlin and Cypher. This section mainly covers Gremlin; see
the [Cypher API](/docs/clients/restful-api/cypher/) for the Cypher HTTP
interface.
+HugeGraph supports two mainstream graph query languages: **Gremlin**
(imperative traversal language) and **Cypher** (declarative pattern matching
language).
+
+- **Gremlin**: The core graph traversal language of Apache TinkerPop, offering
rich traversal primitives and fine control over complex topological paths.
+- **Cypher**: The declarative query language standardized by openCypher,
featuring intuitive SQL-like patterns (`MATCH ... WHERE ... RETURN`) for Neo4j
parity.
+
+## Language Guides & References
+
+- [HugeGraph-Gremlin](/docs/language/hugegraph-gremlin/)
+
+ Gremlin traversal fundamentals, CRUD query examples, and TinkerPop feature
support.
+- [HugeGraph Cypher](/docs/language/hugegraph-cypher/)
+
+ Cypher language support via cypher-for-gremlin, read/write statement
examples, execution mechanics, and constraints.
+- [Cypher Compatibility](/docs/language/cypher-compatibility/)
+
+ Coverage matrix for Cypher clauses and functions, known behavior
differences, and workarounds for unsupported features.
+- [Migrate from Neo4j](/docs/language/migrate-from-neo4j/)
+
+ Core differences between Neo4j and HugeGraph in graph modeling, ID
strategies, multiple labels, and query translation.
+- [Sample Graph Data](/docs/language/hugegraph-example/)
+
+ The classic 6-vertex 6-edge TinkerPop sample graph dataset used across query
examples.
Review Comment:
R2 status at `01b8113f`: **fixed**. The card now reads "TitanDB Graph of the
Gods (12 vertices)" in EN and CN.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]