Skip to content

Commit 0aece20

Browse files
lmeyerovclaude
andcommitted
docs(gfql): fix index_adjacency quick-start — working chain form, not unsupported Cypher
The quick-start ran a Cypher string 'MATCH (a)-[e]->(b) WHERE a.id IN $seeds RETURN a, e, b' that hits a known limitation (#1273: row lowering supports one MATCH source alias at a time), so it raised in test-docs and would mislead any reader who copy-pasted it. Replace with the canonical native seeded-traversal chain — [n({id: is_in(seeds)}), e_forward(), n()] — which is what this index page is actually about, uses the index automatically, and runs green. Also defines the previously-undefined my_seed_ids. Full doc-examples suite now passes locally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f395f62 commit 0aece20

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

docs/source/gfql/index_adjacency.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@ Quick start
3030
.. code-block:: python
3131
3232
import graphistry
33+
from graphistry import n, e_forward, is_in
3334
3435
g = graphistry.edges(edges_df, "src", "dst").nodes(nodes_df, "id")
3536
3637
# Build the indexes once (out+in adjacency, plus a node-id accelerator when ids are unique)
3738
g = g.gfql_index_all()
3839
39-
# Seeded query — the index is used automatically (default index_policy='use')
40-
out = g.gfql("MATCH (a)-[e]->(b) WHERE a.id IN $seeds RETURN a, e, b",
41-
params={"seeds": my_seed_ids})
40+
# Seeded traversal — the index is used automatically (default index_policy='use')
41+
my_seed_ids = ["a", "b"] # your seed node ids
42+
out = g.gfql([n({"id": is_in(my_seed_ids)}), e_forward(), n()])
4243
4344
``gfql_index_all()`` is the one-liner. For finer control, build a single kind:
4445

0 commit comments

Comments
 (0)