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

DOC-2367 fix(doc):add doc for 3.11 feature; #6

Open
wants to merge 2 commits into
base: 3.11
Choose a base branch
from
Open
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/widgets/images/markdown-toolbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/widgets/images/markdown-variable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added modules/widgets/images/widget-query-setting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions modules/widgets/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
** xref:sankey.adoc[Sankey]
** xref:scatter-plot-widget.adoc[Scatter Chart]
** xref:inputs.adoc[Inputs]
* xref:patternsearch.adoc[Pattern Search]
* xref:actions.adoc[]
* xref:conditional-styling.adoc[]
31 changes: 0 additions & 31 deletions modules/widgets/pages/graph-widget.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,37 +58,6 @@ Double-click to expand them and reveal the full set of vertices.
The Undo/Redo buttons are in the top right of the graph window.
All history is recorded since opening the graph widget.

== Patterns and queries

The search bar at the top allows you to show graph results from no-code pattern searches or from interpreted GSQL queries.

=== Pattern search

In this example, we use a sample graph called `social` from the GSQL 101 TigerGraph Cloud Starter Kit.
Click on the search bar and select different types of vertices or edges to see patterns.

image::graph-pattern-social.png[]

If your vertices and edges have several attributes, you can add a filter to limit the results.
This is equivalent to adding a `WHERE` clause in GSQL.

In this example, we added filters after both `person` vertex options in the pattern.
This allows us to show only friendships between people who are both over 24 years old.

Creating a zero-code graph pattern search like this actually creates a GSQL query behind the scenes.
Click the gear icon the right of the search bar and choose btn:[Copy generated query to clipboard], then paste it elsewhere to see how it was done.

=== GSQL query

If you would rather write your own GSQL query rather than searching for a pattern, click the magnifying glass icon to the left of the search bar to switch to the GSQL Query input option.

From there, you can write a GSQL query and view the results visualized in the Graph View.
Try pasting in the generated GSQL query from your pattern view.
You should see exactly the same results.

Try following along with the queries in xref:gsql-ref:tutorials:gsql-101/index.adoc[] using the same small friendship graph.
Remember that Insights only works with GSQL queries in xref:gsql-ref:appendix:interpreted-gsql-limitations.adoc[Interpreted mode.]

== Pathfinding

TigerGraph Insights includes a simple way to run pathfinding detection algorithms without writing a single query.
Expand Down
12 changes: 12 additions & 0 deletions modules/widgets/pages/markdown-widget.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ Users can also use Markdown to add HTML.
.Adding HTML
image::markdown5.png[]

=== Dynamic Content

Markdown content can incorporate variables stored in the current page. For creating a variable, please refer to the xref:inputs.adoc[Inputs Widget].

* Hover over the `var` menu item in the toolbar of the Markdown widget to display the currently available variables.

image::markdown-toolbar.png[]

* Type `$(variables.<variablename>)` in the Markdown content field on the left, and you will see the evaluated result on the right.

image::markdown-variable.png[]

== HTML Restrictions

The `<iframe>` tag is subject to security restrictions and cannot:
Expand Down
61 changes: 61 additions & 0 deletions modules/widgets/pages/patternsearch.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
= Pattern Search
:experimental:

== Patterns and queries

The search bar at the top allows you to show graph results from no-code pattern searches or from interpreted GSQL queries.

=== Pattern search

In this example, we use a sample graph called `social` from the GSQL 101 TigerGraph Cloud Starter Kit.
Click on the search bar and select different types of vertices or edges to see patterns.

image::graph-pattern-social.png[]

If your vertices and edges have several attributes, you can add a filter to limit the results.
This is equivalent to adding a `WHERE` clause in GSQL.

In this example, we added filters after both `person` vertex options in the pattern.
This allows us to show only friendships between people who are both over 24 years old.

Creating a zero-code graph pattern search like this actually creates a GSQL query behind the scenes.
Click the gear icon the right of the search bar and choose btn:[Copy generated query to clipboard], then paste it elsewhere to see how it was done.

=== GSQL query

If you would rather write your own GSQL query rather than searching for a pattern, click the magnifying glass icon to the left of the search bar to switch to the GSQL Query input option.

From there, you can write a GSQL query and view the results visualized in the Graph View.
Try pasting in the generated GSQL query from your pattern view.
You should see exactly the same results.

Try following along with the queries in xref:gsql-ref:tutorials:gsql-101/index.adoc[] using the same small friendship graph.
Remember that Insights only works with GSQL queries in xref:gsql-ref:appendix:interpreted-gsql-limitations.adoc[Interpreted mode.]

=== Advanced Settings

The Pattern Search box includes advanced settings that allow you to customize and optimize your queries. These settings can be accessed by clicking on the image:advanced-settings-button.png[] button.

image:widget-query-setting.png[]

==== Advanced Settings Options

* *Order By:* Specify the attribute(s) by which to order the results. You can choose to order in ascending or descending order.

[NOTE]
====
The `Order By` option is only available for queries that return tabular results.
====

* *Limit:* Set a limit on the number of results returned by the query. This is useful for managing large datasets and focusing on the most relevant results.

[NOTE]
====
The default limit is 300 results. Please be cautious when setting a high limit, as it can impact query performance and UI responsiveness.
====

* *Path Hops Limit:* Define the maximum number of hops (edges) allowed in the paths returned by the query. This helps control the depth of the search and can improve query performance.

* *Timeout (Seconds):* Set a timeout for the query in seconds. This ensures that the query does not run indefinitely and helps manage system resources.

* *Memory Limit (MBs):* Specify a memory limit for the query in megabytes. This helps prevent the query from consuming excessive memory and impacting system performance.