# DocArrayRetriever

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/retrievers/docarray/DocArrayRetriever)

`DocArray Document Indices` retriever.

Currently, it supports 5 backends:
InMemoryExactNNIndex, HnswDocumentIndex, QdrantDocumentIndex,
ElasticDocIndex, and WeaviateDocumentIndex.

## Signature

```python
DocArrayRetriever()
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `index` | `unknown` | Yes | One of the above-mentioned index instances |
| `embeddings` | `unknown` | Yes | Embedding model to represent text as vectors |
| `search_field` | `unknown` | Yes | Field to consider for searching in the documents. Should be an embedding/vector/tensor. |
| `content_field` | `unknown` | Yes | Field that represents the main content in your document schema. Will be used as a `page_content`. Everything else will go into `metadata`. |
| `search_type` | `unknown` | Yes | Type of search to perform (similarity / mmr) |
| `filters` | `unknown` | Yes | Filters applied for document retrieval. |
| `top_k` | `unknown` | Yes | Number of documents to return |

## Extends

- `BaseRetriever`

## Properties

- `index`
- `embeddings`
- `search_field`
- `content_field`
- `search_type`
- `top_k`
- `filters`
- `model_config`

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/retrievers/docarray.py#L22)