SearchClient.GraphAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| GraphAsync(String, String, String, IEnumerable<VectorQuery>, Nullable<GraphQueryExecutionMode>, IEnumerable<GraphQueryExplainStage>, Nullable<Boolean>, Nullable<Boolean>, GraphQueryProvenanceParameters, String, Nullable<Boolean>, CancellationToken) |
Executes a graph query over an index with an edge-list graph profile. |
| GraphAsync(RequestContent, String, Nullable<Boolean>, RequestContext) |
[Protocol Method] Executes a graph query over an index with an edge-list graph profile.
|
GraphAsync(String, String, String, IEnumerable<VectorQuery>, Nullable<GraphQueryExecutionMode>, IEnumerable<GraphQueryExplainStage>, Nullable<Boolean>, Nullable<Boolean>, GraphQueryProvenanceParameters, String, Nullable<Boolean>, CancellationToken)
Executes a graph query over an index with an edge-list graph profile.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Models.GraphQueryResult>> GraphAsync(string gql, string search = default, string filter = default, System.Collections.Generic.IEnumerable<Azure.Search.Documents.Models.VectorQuery> vectorQueries = default, Azure.Search.Documents.Models.GraphQueryExecutionMode? executionMode = default, System.Collections.Generic.IEnumerable<Azure.Search.Documents.Models.GraphQueryExplainStage> explain = default, bool? includeStatistics = default, bool? includeDiagnostics = default, Azure.Search.Documents.Models.GraphQueryProvenanceParameters provenance = default, string querySourceAuthorization = default, bool? enableElevatedRead = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GraphAsync : string * string * string * seq<Azure.Search.Documents.Models.VectorQuery> * Nullable<Azure.Search.Documents.Models.GraphQueryExecutionMode> * seq<Azure.Search.Documents.Models.GraphQueryExplainStage> * Nullable<bool> * Nullable<bool> * Azure.Search.Documents.Models.GraphQueryProvenanceParameters * string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Models.GraphQueryResult>>
override this.GraphAsync : string * string * string * seq<Azure.Search.Documents.Models.VectorQuery> * Nullable<Azure.Search.Documents.Models.GraphQueryExecutionMode> * seq<Azure.Search.Documents.Models.GraphQueryExplainStage> * Nullable<bool> * Nullable<bool> * Azure.Search.Documents.Models.GraphQueryProvenanceParameters * string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Models.GraphQueryResult>>
Public Overridable Function GraphAsync (gql As String, Optional search As String = Nothing, Optional filter As String = Nothing, Optional vectorQueries As IEnumerable(Of VectorQuery) = Nothing, Optional executionMode As Nullable(Of GraphQueryExecutionMode) = Nothing, Optional explain As IEnumerable(Of GraphQueryExplainStage) = Nothing, Optional includeStatistics As Nullable(Of Boolean) = Nothing, Optional includeDiagnostics As Nullable(Of Boolean) = Nothing, Optional provenance As GraphQueryProvenanceParameters = Nothing, Optional querySourceAuthorization As String = Nothing, Optional enableElevatedRead As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of GraphQueryResult))
Parameters
- gql
- String
The nonempty GQL query to bind and execute.
- search
- String
Full-text search text used to constrain graph backend requests.
- filter
- String
An OData filter over graph-index fields applied throughout graph execution.
- vectorQueries
- IEnumerable<VectorQuery>
Vector queries used to constrain the graph's backend searches.
- executionMode
- Nullable<GraphQueryExecutionMode>
Executes the query by default. planOnly builds the plan without backend query execution and requires at least one explain stage.
- explain
- IEnumerable<GraphQueryExplainStage>
Diagnostic plan stages to include in the response. Plan representations are diagnostic information rather than an executable client contract.
Whether to include graph execution statistics. Defaults to true.
Whether to include informational diagnostics. Errors and warnings are returned regardless of this setting.
- provenance
- GraphQueryProvenanceParameters
Controls bounded assertion evidence and optional source-document hydration.
- querySourceAuthorization
- String
Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents.
A value that enables elevated read that bypass document level permission checks for the query operation.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
Exceptions
gql is null.
gql is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Applies to
GraphAsync(RequestContent, String, Nullable<Boolean>, RequestContext)
[Protocol Method] Executes a graph query over an index with an edge-list graph profile.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> GraphAsync(Azure.Core.RequestContent content, string querySourceAuthorization = default, bool? enableElevatedRead = default, Azure.RequestContext context = default);
abstract member GraphAsync : Azure.Core.RequestContent * string * Nullable<bool> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GraphAsync : Azure.Core.RequestContent * string * Nullable<bool> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GraphAsync (content As RequestContent, Optional querySourceAuthorization As String = Nothing, Optional enableElevatedRead As Nullable(Of Boolean) = Nothing, Optional context As RequestContext = Nothing) As Task(Of Response)
Parameters
- content
- RequestContent
The content to send as the body of the request.
- querySourceAuthorization
- String
Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents.
A value that enables elevated read that bypass document level permission checks for the query operation.
- context
- RequestContext
The request options, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
content is null.
Service returned a non-success status code.