14.10 Filter Expressions

This guide explains the usage of filter expressions.

Filter expressions are applied in the following scenarios:

  • Path-Finding: Include only specific vertices and edges in a path
  • Sub-Graphs: Include only specific vertices and edges in a subgraph
  • Set creation: Create a vertex or edge set and include only specific vertices or edges

There are two types of filter expressions:

  • Vertex filters:: Evaluated on each vertex
  • Edge filters: Evaluated on each edge, including the two vertices it connects.

These filter expressions will evaluate to true if the current edge or vertex matches the expression or to false if it does not. Filter expressions are stateless and side-effect free.

The following short example below will evaluate to true for all edges where the source vertex's string property name is "PGX".

src.name="PGX"