Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9749763
D8690.id31385.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D8690.id31385.diff
View Options
diff --git a/docs/grpc-api.rst b/docs/grpc-api.rst
--- a/docs/grpc-api.rst
+++ b/docs/grpc-api.rst
@@ -187,7 +187,7 @@
$ grpc_cli call localhost:50091 swh.graph.TraversalService.GetNode \
'swhid: "invalidswhid"'
- Rpc failed with status code 3, error message: malformed SWHID: swh:1:ori:ffffffffffffffffffffffffffffffffffffffff
+ Rpc failed with status code 3, error message: malformed SWHID: invalidswhid
Selecting returned fields with FieldMask
@@ -379,17 +379,22 @@
~~~~~~~~~~~~~~~~~~~~~~
To avoid using up too much memory or resources, a traversal can be limited
-in two different ways:
+in three different ways:
- the ``max_depth`` attribute defines the maximum depth of the traversal.
- the ``max_edges`` attribute defines the maximum number of edges that can be
fetched by the traversal.
+- the ``max_matching_nodes`` attribute defines how many nodes matching the
+ given constraints (see :ref:`swh-graph-grpc-api-return-nodes`) may be
+ visited by the traversal before halting.
+ This is typically used to limit the number of results in leaves requests.
When these limits are reached, the traversal will simply stop. While these
options have obvious use-cases for anti-abuse, they can also be semantically
useful: for instance, specifying ``max_depth: 1`` will only return the
*neighbors* of the source node.
+.. _swh-graph-grpc-api-return-nodes:
Filtering returned nodes
~~~~~~~~~~~~~~~~~~~~~~~~
@@ -534,9 +539,9 @@
swhid: "swh:1:dir:0000000000000000000000000000000000000017"
swhid: "swh:1:dir:0000000000000000000000000000000000000016"
swhid: "swh:1:cnt:0000000000000000000000000000000000000015"
- middle_node_index: 5
+ midpoint_index: 5
-Because ``middle_node_index = 5``, the common ancestor is
+Because ``midpoint_index = 5``, the common ancestor is
``swh:1:rev:0000000000000000000000000000000000000018``.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Aug 24, 6:12 PM (1 d, 12 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216965
Attached To
D8690: docs/grpc-api.rst: Update to match to current code
Event Timeline
Log In to Comment