Operating Knowledge Storage
The vector DB is where documents are stored after they are converted into a form (vectors) that the AI can search. The search data created by knowledge indexing is stored here, and AI document search and RAG answers use this data.
The data stored in the vector DB is derived data that can be created again from the source documents at any time. Changing or resetting the vector DB does not change the source files in the workspace.
Before you begin
- Required permission: Workspace administrator
- Check the current driver and connection status in
Knowledge Services>Knowledge Storage. - Switching or resetting the store can affect search results until they are ready again, so set a time for the work.
Choose a vector store
Select it in Driver in Knowledge Storage.
| Driver | Storage location | Collection preparation | Recommended environment |
|---|---|---|---|
| Automatic (SQLite) | A file inside the SpaceBuilder server | Not required | The default. When you select an embedding model, the built-in SQLite store is used. |
| Local (SQLite) | The local_vectors.db file in the path you specify | Not required | Small environments with about 50,000 vectors or fewer. Use it when you want to set the storage path yourself. |
| Qdrant | An external Qdrant server | Created automatically | When there are many vectors or when you separate the search data onto another server |
| Milvus | An external Milvus server | Must be created in advance | When you already operate Milvus or need a large-scale cluster |
The number of vectors is the number of document pieces (chunks), not the number of documents. A document is 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. One long document can become dozens of vectors.
For how to install and connect an external vector DB, see each document.
- Connect Qdrant — Lightweight, because it can be installed with a single Docker container. If you are setting up a separate server for the first time, Qdrant is recommended.
- Connect Milvus — A separate server with 8 GB of memory or more is recommended. You must create the collection yourself.
Operate Local (SQLite)
The Local driver runs vector search with a single SQLite file (local_vectors.db), without an external service.
| Item | Details |
|---|---|
| Storage file | local_vectors.db under Data Path |
| Data Path | The default is vectordb_local. A relative path is resolved from the folder that contains the SpaceBuilder configuration file. |
| Search method | Compares all stored vectors. With 1,024 dimensions, it takes about 10 ms for 10,000 vectors, and the search time increases as the data grows. |
| Recommended scale | About 50,000 vectors or fewer. Beyond that, switching to Qdrant or Milvus is recommended. |
Vector DB Overview also shows local_vectors.db usage.
| Item | Meaning |
|---|---|
| DB file / WAL / SHM | The size of the SQLite main file and the write log files |
| Reusable space inside DB | Space that became empty when data was deleted but has not yet been removed from the file size. This space is reused first when new data is stored. |
When you change the store or the embedding model
If you change any of the following items and save, SpaceBuilder detects the change and automatically starts a full reindexing from the source.
- Driver, endpoint, collection, data path
- Embedding model, vector dimension
The switch proceeds in the following order.
- Save the new settings.
- The indexing scheduler detects the change and requests a full reindexing from the source.
- All documents are embedded again with the new settings and stored in the new store.
- When all documents are stored in the new store and search verification is finished, the previous vectors are deleted from where they were originally stored.
Search during the switch
- Until the change is detected, vector search is paused briefly and only keyword search is used.
- During reindexing, the new store is searched. Documents that have not been moved to the new store yet may not appear in vector search results.
- When reindexing finishes, only the vectors created with the new settings are searched.
Reindexing can take a long time when there are many documents, so switch at a time when few users are active.
Cautions when switching
- Keep the previous external store running until cleanup finishes. If you moved from Qdrant or Milvus to another store, the previous server must stay reachable until deletion of the previous vectors finishes. If it cannot be reached, the cleanup work keeps retrying with
Recorded target unavailable. - If you change the vector dimension, specify a new collection as well. The dimension of a Qdrant or Milvus collection that has already been created cannot be changed. Vectors cannot be stored in a collection with a different dimension.
- Reverting to the previous settings also indexes again. If you revert in the order A → B → A, the data of the first A is not reused, and indexing is done anew.
Check the operating status
Vector DB Overview
Check it at the top of the Knowledge Storage screen.
| Item | Meaning |
|---|---|
| Connection | Whether the vector store can be reached |
| Vector Store | The driver in use and its type (Embedded or Service-backed) |
| Stored vectors | The number of vectors stored by this instance (the current SpaceBuilder). It does not include the data of other instances that use the same store. |
| Total Collections | 1 for Local (0 before the first indexing); for Qdrant and Milvus, the total number of collections on that server |
| Collection configuration | Whether the dimension and distance metric of the store match the settings |
Collection configuration shows one of the following.
| Display | Meaning |
|---|---|
| OK (compatible with current settings) | The collection can be used. |
| Not created yet · it is created automatically on first indexing | The Qdrant collection does not exist yet. This is not an error, and the collection is created on the first indexing. |
| Collection not found · create it in Milvus first | A Milvus collection is not created automatically. Create it by following Connect Milvus. |
| Collection configuration needs review | The dimension or the distance metric does not match. Check the error detail shown with it. |
Knowledge indexing page
Check the progress in the Knowledge Indexing Overview of Knowledge indexing.
| Item | Meaning |
|---|---|
| Pending refresh | The number of newly created or modified files that are waiting for indexing |
| Pending embed | The number of items whose text extraction is finished and that are waiting to be converted into vectors |
| Embeddings | The current number of embeddings recorded by SpaceBuilder. During a switch or reindexing, it can differ from Stored vectors of the vector DB. |
| Pending vector deletion | The number of vectors that are waiting to be removed from their original storage location after a file is deleted or the store is switched |
If deletion of the previous vectors fails, the storage target and the reason are shown in the cleanup retry list. The retry interval increases gradually, up to 5 minutes.
| Reason | Meaning and action |
|---|---|
| Recorded target unavailable | The previous vector DB server is turned off or cannot be reached. When you turn the previous server back on, cleanup continues automatically. |
| Remote deletion failed | The vector DB rejected the deletion request. Check the status and logs of the vector DB server. |
| Checking an earlier write outcome | A storage request whose result has not been confirmed remains, so deletion is waiting to complete. In most cases it is resolved automatically. |
| Failed to record deletion completion | The deletion was done, but the completion could not be recorded in SpaceBuilder. It is tried again in the next cycle. |
Vector sync and rebuild
Run these actions in the Administrator Only area of Knowledge Storage. Neither action deletes the source files, and both require a Team license or higher.
| Action | Behavior | When to use |
|---|---|---|
Sync Existing Embeddings | Copies the existing embeddings that are compatible with the current document chunks to the selected vector DB, and creates again only the vectors that cannot be recovered. | When you changed the vector DB or vectors are missing from the store |
Rebuild Vector Generation | Creates a new vector generation while keeping the previous vectors, and cleans up the previous vectors when verification is finished. | When the stored vectors must be rebuilt from the beginning |
- Both actions only submit a request. Check the progress in Ingestion & Indexing.
- They do not affect the data of other instances that use the same Qdrant or Milvus collection.
When multiple instances share one vector DB
An instance is one SpaceBuilder that is installed and operated separately. Each instance has a unique instance isolation key, and this key is recorded together with the vectors it stores. Therefore, even when instances share the same collection, search, statistics, and vector cleanup take place only within the data of each instance.
However, to do backup, capacity management, and deletion for each instance, using a separate collection for each instance is recommended. If you use the default collection name (knowledge_vectors), the settings screen shows a warning together with the recommended name for this instance (setfn_knowledge_...).
Backup and restore
Back up knowledge data with a command after you stop the SpaceBuilder server. If the server is running, backup and restore are rejected. You can restore only a backup that was created on the same instance and in the same home folder.
# Back up (the target folder must be a new path that does not exist yet)
~/setfn-spacebuilder admin knowledge-backup <backup folder>
# Restore
~/setfn-spacebuilder admin knowledge-restore <backup folder>
| Target | Included in the backup |
|---|---|
| Knowledge indexing records (team and personal spaces) | Included |
local_vectors.db of Local | Included only when it is inside the SpaceBuilder home or configuration folder |
| Vectors in Qdrant or Milvus | Not included (derived data that is created again from the source) |
After restoring, start the server and run Sync Existing Embeddings in Knowledge Storage to refill the vector DB. Vectors that were stored in the external vector DB after the backup are handed over as cleanup targets during the restore and are deleted automatically from their original storage location after the server starts.
Troubleshooting
| Symptom | What to check |
|---|---|
The connection status is Not Connected | Check the endpoint address and port, the firewall, and whether the vector DB server is running. |
Collection configuration needs review with collection dimension is ..., expected ... | The collection dimension differs from the vector dimension you set. Specify a new collection name. |
Collection configuration needs review with an error related to unnamed dense vector | The Qdrant collection was created as Hybrid or with a named vector. See Connect Qdrant. |
| Stored vectors does not increase | Check that knowledge indexing is turned on, that the current time is not outside the allowed time windows, and that all items in Before you start are complete. |
A warning is shown on AI vector database in Before you start | A vector DB connection error, a collection mismatch, or a missing Milvus collection. For a connection error or a mismatch, hover over the card to see the detailed error. No separate error detail is shown for a missing Milvus collection, so create the collection by following Connect Milvus. Select the card to go to the vector DB settings. |
Not Connected because authentication is enabled on the vector DB | In Knowledge Storage, enter the API key (Qdrant and Milvus) or the username and password (Milvus), and save. |
| Cleanup retries keep accumulating | Check whether the previous store can be reached. See the action for each reason in Check the operating status. |