> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Result • Rust AI Agent SDK

> SearchResult: Container for search results.

# SearchResult

> Defined in the [**knowledge**](../modules/knowledge) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Container for search results.

## Fields

| Name          | Type                          | Description                                              |
| ------------- | ----------------------------- | -------------------------------------------------------- |
| `results`     | `Vec&lt;SearchResultItem&gt;` | List of result items                                     |
| `metadata`    | `HashMap&lt;String`           | Search metadata                                          |
| `query`       | `String`                      | Original query                                           |
| `total_count` | `Option&lt;usize&gt;`         | Total count (may differ from results.len() if paginated) |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new(query: impl Into<String>, results: Vec<SearchResultItem>) -> Self
```

Create a new search result

**Parameters:**

| Name      | Type                          |
| --------- | ----------------------------- |
| `query`   | `impl Into&lt;String&gt;`     |
| `results` | `Vec&lt;SearchResultItem&gt;` |

### `is_empty`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn is_empty(&self) -> bool
```

Check if empty

### `len`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn len(&self) -> usize
```

Get result count

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/knowledge/mod.rs#L145">
  `praisonai/src/knowledge/mod.rs` at line 145
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Web Search" icon="search" href="/docs/rust/web-search" />

  <Card title="Rust Query" icon="magnifying-glass" href="/docs/rust/query" />
</CardGroup>
