---
title: Get documents from the index
slug: cms-12/docs/getting-documents
createdAt: 2026-08-10T15:56:02.000Z
---

You can retrieve indexed objects using the `IClient` interface `Get` method. This method requires a type (as a type parameter) and an ID and returns the indexed object of that type or null if it does not find a document with that ID and type.

```csharp
IClient client = //A client retrieved from config or injected into the method
BlogPost result = client.Get<BlogPost>(42);
```

One of the `Get` method overloads also accept a list of IDs. Moreover, an extension method with the same name accepts a list of IDs as params. These methods return an `IEnumerable` of `GetResult`, which contains information about whether it finds the document and (if found) the indexed object.

:::hint{type="info"}
**Note**
While indexed objects can be returned as the same type as they were before they were indexed, only the values of public properties with both a getter and a setter are populated by default.
:::

## GetWithMeta

The `IClient` interface `GetWithMeta` method gets indexed objects and returns the indexed object wrapped in a `GetResult` object. A typical use case retrieves the object and its version number, which you can use in optimistic concurrency checks (and update objects only if they have not changed because they are being fetched).

## Classes without parameter-less constructors

You might be unable to de-serialize types without parameter-less constructors or outer dependencies. In many cases, that is a sign that the types are not suitable to use as search results. In these cases, it is probably better to only fetch their IDs and then get them from the database or other backing store or project their values using the `select` method. However, by adding to the`Client` class conventions, you can customize how people create instances of a specific class.
