58
1
using System;
2
using System.Threading.Tasks;
3
using Lifti;
4
using Lifti.Querying;
5
6
public class Program
7
{
8
public static async Task Main()
9
{
10
var index = await CreateAndPopulateTestIndex();
11
12
var results = index.Search("item ~> ((1 ~ 2) | (6 & 7))", QueryExecutionOptions.IncludeExecutionPlan);
13
var executionPlan = results.GetExecutionPlan();
14
15
// Accessing the root node
16
var rootNode = executionPlan.Root;
17
18
// Example: iterating through the node hierarchy
19
void PrintNodeDetails(QueryExecutionPlanNode node, string indent = "")
20
{
21
Console.Write($"{indent}#{node.ExecutionOrder} ");
22
if (node.Kind == QueryExecutionPlanNodeKind.QueryPart)
23
{
24
Console.Write($"Searching: {node.Text}");
Cached Result