---
title: Search content in Optimizely Graph with the C# SDK
slug: cms-13/docs/searching
docTags: 
createdAt: 2026-07-30T20:22:04.235Z
---

Use `.SearchFor()` to run full-text searches against indexed content in Optimizely Graph. Search all text fields or target specific fields, boost relevance, apply filters, and track which results users click.

Combine `.SearchFor()` with `.UsingFullText()` to search all text fields. Use `.UsingField()` to target specific fields and control relevance boosting.

## Search across all fields

Search every indexed text field when the match could appear anywhere in the content.

```csharp
var result = await client
    .QueryContent<BlogPostPage>()
    .SearchFor("graph api")
    .UsingFullText()
    .GetAsContentAsync();
```

## Search a specific field

Restrict the search to a single field for more targeted results.

```csharp
var result = await client
    .QueryContent<BlogPostPage>()
    .SearchFor("sorting")
    .UsingField(x => x.Title!)
    .GetAsContentAsync();
```

## Boost relevance for specific fields

Pass a `boost` value to increase the importance of matches in specific fields. Higher numbers have greater influence:

```csharp
var result = await client
    .QueryContent<BlogPostPage>()
    .SearchFor("api")
    .UsingField(x => x.Title!, boost: 3)
    .UsingField(x => x.Tags!, boost: 1)
    .GetAsContentAsync();
```

:::hint{type="info"}
**Note**
Matches in `Title` rank three times higher than matches in `Tags`.
:::

## Combine search with filters

Chain `.Where()` to narrow search results by field values:

```csharp
var result = await client
    .QueryContent<BlogPostPage>()
    .SearchFor("api")
    .UsingFullText()
    .Where(x => x.BlogCategory == "Tutorials")
    .GetAsContentAsync();
```

## Enable click-through tracking

Add `.Track()` to your search query to record which results users click.

```csharp
var result = await client
    .QueryContent<BlogPostPage>()
    .SearchFor("api")
    .UsingFullText()
    .Track()
    .GetAsContentAsync();
```

:::hint{type="info"}
**Note**
`.Track()` works only when combined with `.SearchFor()`. See [Track search result clicks in C# SDK](docId\:wzB3gTVamNCXBp17QrLo5) for the full setup.
:::
