Search Execution Scopes
Some advanced search customizations involve writing code that runs during query execution or during node content materialization. Each context provides its own scope.
Search Index Scope
Available when writing code that runs as part of a custom search index query execution.
| Property / Method | Type | Description |
|---|---|---|
Graph / G |
Graph |
Access to the full graph API. |
Query() / Q() |
IQuery |
Creates a new graph query. |
SearchQuery |
ISearchExpression |
The search expression currently being executed. |
UserUID |
UID128 |
The UID of the user performing the search. |
VirtualNodeSource |
IVirtualNodeSource |
Source for generating virtual (derived) nodes in search results. |
IndexUID |
IndexUID |
The UID of the custom search index currently executing. |
ChatAI |
ChatAI |
Helper for interacting with configured AI providers. |
Tracker |
QueryTracker |
Shared performance tracker for all queries created in this scope. |
CancellationToken |
CancellationToken |
Cancellation token. |
CreateHttpClient() |
HttpClient |
Creates a pre-configured HTTP client for external requests. |
Logger |
ILogger |
Logger instance. |
RunEndpointAsync<T>(endpointName, ...) |
Task<T> |
Executes a custom endpoint by name. |
RunToolAsync(toolUID, functionName, ...) |
Task<ToolCallResult> |
Executes a registered AI tool by UID and function name. |
Materialize Node Scope
Available when writing code that controls how a node's content is retrieved for display in search results (custom materialization).
| Property / Method | Type | Description |
|---|---|---|
Content |
NodeContent |
The content of the node being materialized. |
IndexUID |
IndexUID |
The UID of the custom search index this materialization belongs to. |
CreateHttpClient() |
HttpClient |
Creates a pre-configured HTTP client for external requests. |
Logger |
ILogger |
Logger instance. |
CancellationToken |
CancellationToken |
Cancellation token. |
Next Steps
- Learn about AI Search: AI Search
- See the full query reference: Graph Query Language