# Qdrant

## Prerequisites

A [locally running instance of Qdrant](https://qdrant.tech/documentation/quick-start/) or a Qdrant cloud instance.

To get a Qdrant cloud instance:

1. Head to the Clusters section of the [Cloud Dashboard](https://cloud.qdrant.io/overview).
2. Select **Clusters** and then click **+ Create**.

<figure><img src="/files/fKFxYcN3Rtpt7JwUMIqR" alt=""><figcaption></figcaption></figure>

3. Choose your cluster configurations and region.
4. Hit **Create** to provision your cluster.

## Setup

1. Get/Create your **API Key** from the **Data Access Control** section of the [Cloud Dashboard](https://cloud.qdrant.io/overview).
2. Add a new **Qdrant** node on canvas.
3. Create new Qdrant credential using the API Key

<figure><img src="/files/P4YjPaOQAOUkTryloxfO" alt="" width="563"><figcaption></figcaption></figure>

4. Enter the required info into the **Qdrant** node:
   * Qdrant server URL
   * Collection name

<figure><img src="/files/cSaS4AKPcYUxrH9TrnoW" alt="" width="239"><figcaption></figcaption></figure>

5. **Document** input can be connected with any node under [**Document Loader**](/integrations/langchain/document-loaders.md) category.
6. **Embeddings** input can be connected with any node under [**Embeddings**](/integrations/langchain/embeddings.md) category.

## Filtering

Let's say you have different documents upserted, each specified with a unique value under the metadata key `{source}`

<div align="left"><figure><img src="/files/DYhqQUoz15sVJzBmOgDw" alt="" width="563"><figcaption></figcaption></figure> <figure><img src="/files/rg3qZRS67x8IGQQn73QY" alt="" width="563"><figcaption></figcaption></figure></div>

Then, you want to filter by it. Qdrant supports following [syntax](https://qdrant.tech/documentation/concepts/filtering/#nested-key) when it comes to filtering:

**UI**

<figure><img src="/files/gJlBA4Sgx95Cce1E7Nqt" alt="" width="338"><figcaption></figcaption></figure>

**API**

```json
"overrideConfig": {
    "qdrantFilter": {
        "should": [
            {
                "key": "metadata.source",
                "match": {
                    "value": "apple"
                }
            }
        ]
    }
}
```

## Resources

* [Qdrant documentation](https://qdrant.tech/documentation/)
* [LangChain JS Qdrant](https://js.langchain.com/docs/integrations/vectorstores/qdrant)
* [Qdrant Filter](https://qdrant.tech/documentation/concepts/filtering/#nested-key)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowiseai.com/integrations/langchain/vector-stores/qdrant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
