# Search Index Execution Scopes

Customizing the search experience often involves writing code to intercept search queries or materialize search results.

# Search Index Scope

Used during the execution of a custom search index query.

Property/Method Type Description
Graph / G Mosaik.GraphDB.Safe.Graph Access to the graph.
Query() / Q() IQuery Creates a new query.
SearchQuery ISearchExpression The search expression being executed.
UserUID UID128 The user performing the search.
VirtualNodeSource IVirtualNodeSource Source for virtual nodes.
CreateHttpClient() HttpClient HTTP client.
Logger ILogger Logger.

# Materialize Node Scope

Used when retrieving the content for a node in a custom search index (e.g., to display in search results).

Property/Method Type Description
Content NodeContent The content of the node being materialized.
CreateHttpClient() HttpClient HTTP client.
Logger ILogger Logger.
CancellationToken CancellationToken Cancellation token.