Skip to content

Connect Qdrant

Qdrant is a vector DB that runs as a separate server. Use it when there are so many documents that the search data exceeds tens of thousands of items, or when you want to operate the AI search data separately from the SpaceBuilder server.

Even when you use Qdrant, the source files and the document text remain in SpaceBuilder. Only the vectors required for search and the minimum information are stored in Qdrant.


Before you begin

  • Required permission: Workspace administrator, and permission to manage the Qdrant connection information
  • The SpaceBuilder server must be able to reach the REST and gRPC endpoints of Qdrant.
  • Check the output dimension of the embedding model.

Install Qdrant

You need a Qdrant server that the SpaceBuilder server can reach. If you already operate Qdrant, skip this section and go to Connection settings.

Installing Qdrant with Docker is the simplest way. The procedure below assumes that Docker is installed on a Linux server.

Preparation

ItemDetails
ServerIt can be on the same server as SpaceBuilder or on a separate server. On the same server, it shares memory with SpaceBuilder, so leave enough headroom.
MemoryVectors are loaded into memory for search speed. With the formula recommended by Qdrant (number of vectors × dimensions × 4 bytes × 1.5), bge-m3 (1,024 dimensions) requires about 0.6 GB for 100,000 vectors and about 6 GB for 1,000,000 vectors.
DiskVectors and the text of document pieces are stored together, so allow 2 to 3 times the required memory.
Ports6333 (REST API) and 6334 (gRPC). SpaceBuilder uses gRPC first and switches to REST if it cannot connect.

Run

Always mount a storage folder so that the data remains even if the container is deleted. The following example stores the data in /data/qdrant and is set to restart automatically when the server reboots.

Pin the image version with the QDRANT_VERSION variable. If you do not specify a version, latest is installed, and the version can be raised unintentionally when the container is created again. The version below is an example from the time this document was written. For an actual installation, replace it with a version that your organization has verified on the Qdrant releases page.

QDRANT_VERSION=v1.19.1
sudo mkdir -p /data/qdrant

docker run -d --name qdrant \
  --restart unless-stopped \
  -p 6333:6333 \
  -p 6334:6334 \
  -v /data/qdrant:/qdrant/storage \
  qdrant/qdrant:${QDRANT_VERSION}

If you operate it on a server other than the SpaceBuilder server, or on a network that many people can access, enable an API key as well. Set the key to a long value that is hard to guess.

QDRANT_VERSION=v1.19.1
docker run -d --name qdrant \
  --restart unless-stopped \
  -p 6333:6333 \
  -p 6334:6334 \
  -v /data/qdrant:/qdrant/storage \
  -e QDRANT__SERVICE__API_KEY='<API key>' \
  qdrant/qdrant:${QDRANT_VERSION}

Verify the installation

curl http://localhost:6333/collections

If a response that contains "status":"ok" is returned, the installation is normal. If you enabled an API key, a response is returned only when you add the api-key header, as in curl -H 'api-key: <API key>' http://localhost:6333/collections.

Open http://<Qdrant server address>:6333/dashboard in a browser to see the dashboard, where you can view the collections and the stored data.

Operation tips

  • Update: Following the official Qdrant upgrade guide, raise the minor version one step at a time (for example, 1.12 → 1.13). Change QDRANT_VERSION to the next version, pull the image with docker pull qdrant/qdrant:${QDRANT_VERSION}, then delete the container and run it again with the same command. The data remains in /data/qdrant.
  • Backup: Stop the container and copy the whole /data/qdrant folder, or use the snapshot API of Qdrant. However, vectors are derived data that can be created again from the source, so even without a backup you can refill the vector DB with Sync Existing Embeddings in SpaceBuilder.
  • Firewall: Restrict access so that only the SpaceBuilder server can connect to ports 6333 and 6334. If you need to connect over HTTPS, placing a reverse proxy in front of Qdrant is recommended.

Connection settings

In Vector DB Setup on the Knowledge Storage screen, enter the values below and save.

ItemValue to enterDescription
DriverQdrantUses an external Qdrant server.
REST endpointhttp://<Qdrant server address>:6333The REST API address of Qdrant. If left empty, http://localhost:6333 is used.
gRPC endpoint (Recommended)http://<Qdrant server address>:6334Used first for search and vector storage. If left empty, it is inferred automatically from the REST address, and the connection switches to REST if gRPC cannot be reached.
CollectionA name dedicated to this instance (the current SpaceBuilder)Using the recommended name shown on the screen (setfn_knowledge_...) is recommended.
API keyThe API key set in QdrantLeave it empty if authentication is not enabled. The stored value is shown masked and is kept unless you change it. If you save with the field empty, it is deleted.
Vector dimensionsThe output dimension of the embedding model1024 for bge-m3. For known models, it is entered automatically when you choose the model.

Qdrant is a service-backed store, so the Data Path field is not shown. All data is stored on the Qdrant server.

When you save, the indexing scheduler checks the new settings immediately and, if needed, automatically starts a full reindexing from the source. You do not need to run a sync separately.

The collection is created automatically

You do not need to create the collection in advance in the Qdrant dashboard. When SpaceBuilder stores the first search data, it creates the collection with the name you set, together with the indexes required for search filters.

Automatically created itemValue
Vector formatA single unnamed vector (dense)
Vector sizeThe vector dimension you set
Distance metricCosine
Filter indexesInstance, generation, space, owner, source path

Before the first indexing, Collection configuration in Vector DB Overview shows Not created yet · it is created automatically on first indexing. This is not an error, so wait until indexing starts.

Cautions when creating a collection yourself

A collection created with Simple Hybrid Search or with a named vector on the Create New Collection screen of the Qdrant dashboard is not compatible with SpaceBuilder. If you specify such a collection, Collection configuration shows Collection configuration needs review and indexing fails at the storage step.

If you must create the collection yourself, run the request below in Console of the dashboard. size must be the same as the vector dimension you set.

PUT /collections/setfn_knowledge_example
{
  "vectors": { "size": 1024, "distance": "Cosine" }
}

Check the stored data

Check the Qdrant status in Vector DB Overview.

ItemMeaning
ConnectionWhether the Qdrant server can be reached
Stored vectorsThe number of vectors stored by this instance. It does not include the data of other instances that use the same collection.
Total CollectionsThe total number of collections on the Qdrant server. It also includes collections that were not created by SpaceBuilder.
Collection configurationWhether the dimension and distance metric of the collection you set match SpaceBuilder

One vector is one document piece (chunk). A document is first divided by section, page, or row depending on its format, and then divided again into pieces of about 700 to 1,000 characters (based on Korean) and stored. Therefore, it is normal for the number of vectors to be much larger than the number of documents.

You can view the actual stored content in Console of the Qdrant dashboard.

Check the number of vectors for each file:

POST /collections/setfn_knowledge_example/facet
{ "key": "source_path", "limit": 50 }

Check some of the stored document pieces:

POST /collections/setfn_knowledge_example/points/scroll
{ "limit": 10, "with_payload": ["source_path", "text"], "with_vector": false }

When multiple instances share one Qdrant

If each instance uses a different collection name, the data is completely separated. If you use the default collection name (knowledge_vectors) as it is, the screen shows a warning together with the recommended name for this instance.

Even when instances share the same collection, an instance isolation key is attached to newly stored vectors, so search and deletion take place only within the data of each instance. However, to do backup, capacity management, and deletion for each instance, separating the collections is safer.

If another SpaceBuilder project running on the same server uses the same collection, a warning is shown on the settings screen.