Migrate from Pinecone to Milvus

Moving a large Pinecone index to self-hosted Milvus is mostly an export, schema and validation project, not a single copy. This page lays out the sequence, what moves cleanly, and what drives effort.

On this page

Migrate from Pinecone to Milvus: what the move involves

A team moving a large Pinecone index to self-hosted Milvus should plan around one constraint first: Pinecone has no bulk export, so the way you read records out of the source index will set the timeline more than the Milvus install will. Pinecone's documented route is to list record IDs, which is supported only on serverless indexes at up to 100 IDs per page, and then fetch the records by ID. Before committing, confirm that your index is serverless, estimate the page count from your record total, and test the listing and fetch rate against a representative namespace. Milvus itself is Apache-2.0 licensed, so the destination carries no license fee, but the hardware, storage and operations work are yours to price.

The work usually falls to three groups. Platform engineers size and run the Milvus deployment, choosing between Milvus Standalone on one machine and the Distributed Kubernetes cluster, and they own etcd, object storage (MinIO, S3 or Azure Blob) and the write-ahead log (Woodpecker, Kafka or Pulsar). Data engineers build the export job, map Pinecone namespaces and metadata to Milvus collections, partitions and fields, and run the bulk load. Application engineers rewrite query code, including filter syntax and any hybrid dense plus sparse search. Security staff should review authentication, TLS and role-based access control before any production data lands in the new cluster, because the Milvus README lists those features and your team must configure them.

The short answer on effort and risk is that the move is moderate in code and high in data handling. Schema and query changes are contained, but the export is paced by Pinecone's listing limits, and recall differences between the two systems can only be measured with your own embeddings and queries. Run both systems in parallel, compare recall and latency on the same query set, and keep Pinecone live until the comparison passes and rollback is tested. Ask any implementation partner to quote the export, load and parallel-run phases separately, since those drive most of the duration.

How Pinecone capabilities map to Milvus

This table maps each Pinecone capability to its nearest Milvus equivalent and labels the effort as clean, needs rework or gap. Read the labels as a planning guide: a clean match still needs confirmation against the Milvus documentation for exact API behavior. Milvus is self-managed here, so there is no Pinecone-style serverless billing to replace.

Pinecone capabilityMilvus equivalentStatus
Vectors and record IDsCollections with a primary key field and a vector field; upsert and query through the Milvus SDKsClean. Confirm how your ID type maps to the primary key schema.
NamespacesPartitions within a collection, or partition key for high-cardinality tenant separationNeeds rework. Choose partitions or partition keys during schema design, since the layout is hard to change later.
Metadata filtersScalar fields with filter expressions in queries, plus scalar indexes on frequently filtered fieldsNeeds rework. Re-express each Pinecone filter operator as a Milvus expression and test edge cases such as null and missing fields.
Serverless indexes and managed scalingSelf-managed Standalone or Distributed deployment on your own Kubernetes or servers, with capacity you size and operateGap. Milvus has no Pinecone-style managed serverless billing; the operations team takes over scaling, upgrades and backups.
Sparse and hybrid searchSparse vectors, BM25 full-text search and hybrid dense plus sparse searchNeeds rework. Rebuild sparse vectors or BM25 fields from source text and confirm the ranking fusion settings you need.
Access controlRole-based access control and authentication, configured in Milvus itselfNeeds rework. Map Pinecone API keys and project roles to Milvus users and roles, then review the privileges granted.
Transport encryptionTLS encryption for client connectionsClean. Confirm certificate management and the settings required for your network path.
Index typesHNSW, IVF, FLAT, SCANN and DiskANN, plus quantization optionsNeeds rework. Pinecone manages index choice for you, so benchmark recall and latency on your own data before selecting an index.
Bulk loading and exportsBulk import and client-side export; no direct Pinecone import path is documented hereNeeds rework. Export from Pinecone by listing and fetching IDs, then load in batches. Confirm current bulk import options in the Milvus docs.

Which records and integrations need to move

A Pinecone move is more than copying vectors. The records themselves, their namespaces and metadata, the query code that calls the index, and every system that reads or writes to it all need an owner and a decision. The cards below cover what to inventory before loading anything into Milvus.

Vector records and IDs

The documented way to read vectors back out of Pinecone is to list record IDs, then fetch records by ID. This listing works only on serverless indexes, and it returns up to 100 IDs per page, so a large index means many paged calls. Confirm the index type first, then estimate the page count and fetch volume with your Pinecone account owner. Keep the original IDs, since Milvus primary keys and downstream references must match them.

Pinecone list IDs docs

Namespace and metadata mapping

Pinecone namespaces and per-record metadata do not map one to one onto Milvus. You need to decide whether each namespace becomes a collection, a partition, or a partition key field, and how metadata fields become typed scalar fields for filtering. Export the metadata alongside each fetched record, because a fetch that returns vectors without metadata will not rebuild your filters. Document the mapping before the first bulk load.

Application query code and SDK calls

Every service that calls Pinecone uses its SDK for upserts, queries, deletes and metadata filters. Each call site needs an equivalent Milvus client call, with filter expressions rewritten in Milvus syntax and index parameters chosen for your recall target. Inventory these calls by repository and by service, and keep a list of which ones return scores that downstream code thresholds on, because those values can shift after the move.

API keys and access control

Pinecone API keys issued to applications, CI jobs and individual developers must be listed and mapped to their Milvus replacements. Milvus provides authentication, TLS and role-based access control, so plan roles per collection and per service account before cutover. Confirm with your security team which credentials are retired at switch-over and who approves new ones, and check that no key is embedded in notebooks or scripts that nobody owns.

RAG pipelines and ingestion jobs

Retrieval pipelines, chat backends and scheduled ingestion jobs write to and read from the index continuously. Identify each job that upserts or deletes records, since a missed writer leaves stale vectors in Milvus after cutover. Pause or dual-write these jobs during the comparison period, and confirm that the embedding model and dimension used by each writer matches the collection schema.

Re-embedding versus exporting

If the source documents still exist and the embedding model is stable, re-embedding from source data may be simpler than exporting vectors page by page. It avoids the serverless-only listing constraint and lets you adopt new index settings from the start. The trade-off is embedding compute and the time to process the corpus again, so compare those costs against the export effort for your largest namespaces before choosing.

Migration sequence from inventory to decommission

This sequence moves a large Pinecone workload to self-hosted Milvus in stages, so each step produces evidence that the next one depends on. Application traffic moves only after recall and latency have been compared on the same queries.

  1. Inventory indexes, namespaces and query patterns

    Engineering and the owners of each application list every Pinecone index, its namespaces, vector dimension, distance metric, metadata fields, record counts and the query shapes the application sends, including filters and top-k values. Confirm with Pinecone which indexes are serverless, because the documented way to list record IDs for export applies only to serverless indexes. The output is an inventory record that lists each index and its owners, which becomes the input for every later step.

  2. Pilot on a representative subset

    Choose one index or one namespace that represents the typical record shape and query mix, then stand up Milvus in the deployment mode that matches the expected scale. Milvus Lite suits local tests, Standalone suits a single machine, and Distributed on Kubernetes suits large or growing collections, and the choice should be confirmed against the Milvus architecture documentation and the team's operations capacity. The pilot is complete when a small copy of the data loads and returns results that the team can inspect by hand.

  3. Design the schema and index

    Define the Milvus collection, its vector field with the exact dimension and metric carried over from Pinecone, scalar fields for the metadata used in filters, and whether to use partitions or a partition key for tenant or namespace separation. Select an index type such as HNSW, IVF, FLAT, SCANN or DiskANN based on the recall target and memory budget from the pilot, and record each choice with its reason. The output is a schema decision record that names the collection layout, index parameters and any fields that will need a sparse or BM25 index for hybrid queries.

  4. Export records and bulk load into Milvus

    Export vectors and metadata from Pinecone page by page, listing record IDs and then fetching records by ID, or re-embed from source data where that is simpler. Load the records into Milvus in batches, keeping the export files so a failed batch can be retried without re-reading the source. Reconcile counts per index and namespace, and spot-check sampled IDs for matching vectors and metadata. The output is a load reconciliation report that shows source counts, loaded counts, any rejected records and the reason for each rejection.

  5. Run both systems in parallel

    Send the same production queries to Pinecone and Milvus, or replay a logged sample of them, and capture the returned IDs and response times for each. Compare overlap of the top results to estimate recall against the Pinecone answers and compare latency at the percentiles the application cares about, and repeat the comparison after any index parameter change. The output is a recall and latency comparison by index and query type, which sets the threshold the team agrees to before cutover.

  6. Cut over application traffic

    Switch the application's vector client to Milvus one index at a time, using a configuration flag so the route can be reversed without a code change. Confirm that authentication, TLS and role-based access control are configured for the service accounts the application uses, and that alerts cover error rates and latency. The cutover is complete when the agreed comparison threshold holds in production and the rollback path has been tested.

  7. Decommission Pinecone after a hold period

    Keep the Pinecone indexes read-only for a period the owners agree in advance, so any missed data or query regression can still be checked against the source. Then delete the indexes, revoke API keys, remove the Pinecone configuration from applications and pipelines, and confirm billing has stopped. The output is a decommission record that lists each deleted index, the key revocation date and the owner who signed off.

How the export, load and parallel run fit together

The flow starts at the Pinecone serverless index, where record IDs are listed page by page and records are fetched by ID into an export store that your organization controls. That store feeds a bulk load into Milvus collections and partitions, and both systems then answer the same queries during the parallel run. Check that the export count matches the source before loading, and use the cutover gate only after recall and latency have been compared on your own workload.

Export from Pinecone, load into Milvus, then compare both systems before cutover.

Designing Milvus collections, partitions and index types

Start by deciding how Pinecone namespaces map to Milvus. A partition or a partition key fits when namespaces are a way to split one logical dataset, such as one tenant or region among many, and queries usually target one slice at a time. A separate collection fits better when namespaces hold data with different embedding models, vector dimensions, distance metrics or retention rules, because a Milvus collection fixes its vector field schema. Pinecone metadata becomes scalar fields in the collection schema, and each field you filter on should be declared with a type you intend to query. Filter expressions in Milvus run against those declared fields, so re-creating the Pinecone metadata filters one by one is the fastest way to find fields that were stored as untyped values in the export and need cleaning first. Write the mapping down before creating any collection, and confirm the current schema, partition and partition key rules against the Milvus architecture overview and the release you plan to run.

Index choice is a trade between recall, memory and disk. HNSW usually gives strong recall and low latency when the working set fits in memory. IVF-family indexes reduce memory pressure at some cost in recall, and tuning the number of probed clusters is part of the work. FLAT scans every vector and gives exact results, which makes it a useful baseline for measuring recall, though it is slow at scale. SCANN and DiskANN target larger datasets, with DiskANN designed around disk-resident data. Milvus also supports quantization and memory-mapped files, which change the memory profile of each choice. In distributed mode, Milvus separates stateless proxies and worker nodes from etcd for metadata, object storage such as MinIO, S3 or Azure Blob for segments, and a write-ahead log such as Woodpecker, Kafka or Pulsar. Those components have their own sizing and failure modes, so plan capacity for them alongside the index.

Treat every index and sizing decision as a hypothesis to test on your own data. Load a representative sample of Pinecone records, including the metadata filters your application actually uses, then compare top-k results against a FLAT baseline for the same queries and record recall and latency at the parameters you are considering. Repeat the test with the vector counts and filter selectivity you expect in production, because index behavior changes with scale. Confirm which index types, GPU options and authentication settings are available in your chosen deployment mode and version, and ask your Milvus operator or vendor to confirm them in writing. The results from this test, not general guidance, should decide the final collection layout.

What drives migration cost and duration

This table lists the factors that change the effort and recurring cost of moving a Pinecone workload to self-hosted Milvus, with what drives each one and how to keep it down. Read it before requesting a quote, since the largest items are usually data volume, the deployment mode you choose and how much validation you require.

Cost driverWhy it changes cost or effortHow to keep it down
Record count and vector dimensionsTotal vectors and dimension size set the export volume, the bulk load time and the memory or disk the cluster needs.Measure record count and dimensions per index first, and size storage from that before choosing hardware.
Namespaces and metadata complexityEach Pinecone namespace must map to a Milvus partition, partition key or collection, and metadata fields must become typed scalar fields for filtering.Inventory namespaces and metadata keys early, and remove unused fields before export.
Serverless-only export constraintsPinecone lists record IDs only on serverless indexes, so pod-based indexes need a different export path such as re-embedding from source data.Confirm the index type for each source index and decide the export route before scoping the work.
Deployment mode and platform skillsMilvus Standalone suits a single machine, while Distributed runs as a Kubernetes-native cluster that needs etcd, object storage and a write-ahead log to be operated well.Match the mode to the team's Kubernetes and object storage experience, and ask the vendor or partner which mode fits your scale.
GPU and quantization choicesGPU indexing with NVIDIA CAGRA and quantization change hardware cost and recall, and each choice needs its own benchmark.Start on CPU indexes, benchmark recall on your own data, and add GPUs only where latency targets require them.
Validation depth for recall and latencyRunning both systems in parallel and comparing recall and latency against Pinecone adds test data preparation, query replay and review time.Define the acceptance thresholds and a representative query set in writing before the migration starts.
Application reworkClient code, filter syntax, metadata handling and ID formats must change, and hybrid BM25 or sparse search may need new query logic.List every Pinecone call in the application and map each one to its Milvus equivalent before the work is scoped.
Recurring operations and upgradesInfrastructure, backups, monitoring, security patching and upgrades across the Apache-2.0 release lines recur after cutover, unlike the one-time load.Ask for the upgrade and support model in the quote, and budget for recurring operations as a separate line item.

What usually goes wrong and how to prevent it

Most failed Pinecone to Milvus migrations do not fail on the vector math. They fail on the edges: records that never left Pinecone, metadata that changed type on the way in, filters that quietly behave differently, and a new cluster that was exposed before anyone secured it. Each card below names one failure and the check that catches it before traffic moves.

Incomplete export from pagination

Listing record IDs is the documented way to read vectors back out of Pinecone, and it works on serverless indexes only, up to 100 IDs per page. A loop that stops early, drops a page on a retry, or ignores a pagination token leaves records behind without any error. Keep a running count, compare it with the index statistics Pinecone reports, and write every page's IDs to a log so a gap can be found and re-fetched by ID.

Pinecone list record IDs

Missing or duplicate IDs

Milvus uses a primary key field that must be unique within a collection, and a record whose ID was never exported cannot be recovered later from Milvus alone. Records with empty IDs, IDs reused across namespaces, or a retry that inserts the same batch twice will either fail or silently create duplicates. Before loading, check that each Pinecone namespace maps to an agreed key scheme and that the number of unique primary keys in Milvus matches the exported count.

Metadata type drift on load

Pinecone metadata is schemaless JSON, so a field can hold a number in one record and a string in the next. Milvus collections define field types up front, and a field declared as integer will reject or coerce values that were stored as text. Profile every metadata key across the export, decide one type per field, and convert dates and identifiers explicitly before insert, so the same filter returns the same rows in both systems.

Filters that behave differently

A filter that matches in Pinecone can return different results in Milvus when missing fields, null values, array membership or string comparisons are handled differently. Write the production filters as a test suite, run each one against both systems on the same sample, and record which result sets differ. Indexes on filtered fields and the choice between scalar filters and partition keys also change speed, so measure latency on the filtered queries too.

Index choices that lower recall

Milvus supports HNSW, IVF, FLAT, SCANN and DiskANN, and the choice changes the recall and latency trade-off. A quantized or disk-based index chosen to save memory can return fewer correct neighbors than the Pinecone index it replaces. Build a ground-truth set by running exact FLAT search on a sample, measure recall against it for each candidate index and its search parameters, and only then fix the configuration.

Undersized memory and storage

A distributed Milvus cluster depends on etcd for metadata, object storage for segments and a log broker for writes, and each needs its own capacity. Vector indexes held in memory can exhaust nodes during bulk load, and object storage and the log layer grow during ingest. Size from the vector count, dimension and index type, leave headroom for compaction and index builds, and confirm the storage backend and sizing with the Milvus architecture documentation before the first load.

Milvus architecture overview

Parallel run that runs out of time

Running Pinecone and Milvus side by side is the only reliable way to compare recall and latency on live traffic, but teams often schedule it too late. Without a fixed comparison window, a cutover gets pushed by a single unexplained mismatch. Agree the metrics, the sample of queries, the acceptable gap and the rollback path in writing before the parallel run starts, and keep Pinecone as the source of truth until those criteria are met.

Open access on the new cluster

Milvus implements authentication, TLS encryption and role-based access control, but a newly deployed cluster does not protect itself. A test cluster reachable from the wider network, with default credentials or plaintext gRPC, can expose embeddings and metadata that include customer data. Before any data load, enable TLS, change credentials, create roles that limit each application to its own collections, and confirm the settings with a scan from outside the trusted network.

Milvus on GitHub

How the move differs by size and starting point

A small index with a modest record count and a single application can often start on Milvus Lite or Milvus Standalone. Lite runs as a Python library inside your process, which suits prototypes and offline validation. Standalone runs on one machine and gives you a server that other applications can reach over the network, which is closer to a production shape without the cluster overhead.

  • Deployment mode: Lite is useful for loading and testing exported records locally before you commit to a server.
  • Single machine: Standalone keeps the footprint to one host plus its supporting services, so there are fewer components to patch.
  • Recall checks: Run the same queries against Pinecone and Milvus on a sample to compare results before scaling up.
  • Growth path: Keep collection and schema definitions in code so the same design moves to a Distributed cluster later without rework.
  • Access controls: Confirm that authentication, TLS and role-based access control are configured on any server that holds production data.

Before you choose Standalone for production, confirm with your own capacity tests that one machine covers memory, storage and query load with headroom.

Questions buyers ask before moving from Pinecone to Milvus

How much does a migration from Pinecone to self-hosted Milvus cost?

The cost has four components: the infrastructure to run Milvus, the engineering time to export, load and validate, the operations work after cutover, and any outside help you buy. Infrastructure is recurring and depends on vector count, dimensions, index type and how much memory the index needs. Engineering and partner work are largely one-time. Pinecone's own charges are usage-based on serverless indexes and plan-based otherwise, so compare your current invoice against the same workload sized for Milvus. Ask any partner for a written, fixed-scope quote that lists the source indexes, the number of collections, the target topology and the validation criteria.

What drives the time a Pinecone to Milvus migration takes?

Timing depends mostly on how fast you can read records out of Pinecone, how many indexes and namespaces you have, and how much design work the target collections need. Pinecone's documented read path lists record IDs only on serverless indexes, returns up to 100 IDs per page, and then fetches records by ID, so the export speed depends on the record count and your request rate. Pod-based indexes need a different route, which you should confirm with Pinecone for your index type. Budget time for schema design, bulk loading, index building, and a parallel run in which recall and latency are compared before you switch traffic.

Can our internal team run this migration without an outside partner?

Yes, if you have engineers who already run Kubernetes or a comparable container platform, know vector indexing, and can own a stateful system. A distributed Milvus deployment depends on etcd for metadata, object storage such as MinIO, S3 or Azure Blob, and a write-ahead log such as Woodpecker, Kafka or Pulsar, so the team must be able to operate all of these. Smaller datasets can start with Milvus Standalone on one machine. Confirm your team's capacity for backups, upgrades and on-call work before you commit, because the migration is the easy part compared with running the cluster afterward.

What does the work need from our engineers and data owners?

The work needs three groups of people. Platform engineers provision and secure the cluster, covering authentication, TLS and role-based access control, which Milvus documents as supported features. Application engineers map Pinecone namespaces and metadata to Milvus collections, partitions and filter fields, and change the query code. Data owners confirm which records may be copied, how long they are kept, and who may access them in the new system. Ask whoever runs the migration to document the source of truth for each collection so that a rollback is possible.

Does Milvus fully replace everything Pinecone offers?

Milvus covers the core job of approximate nearest-neighbor search with metadata filtering, and it adds features that Pinecone users often ask about, including BM25 full-text search, sparse vectors, hybrid dense plus sparse search, and multi-tenancy at database, collection, partition or partition key level. Confirm each Pinecone feature your application depends on, such as specific metadata filter operators, namespace behavior, sparse vector support, and serverless-specific APIs, against the Milvus documentation and a test run. Do not assume a one-to-one API match. Query code usually changes, and that change belongs in the migration plan.

How do we validate recall and latency before cutting over from Pinecone?

Run both systems in parallel on the same set of representative queries, then compare the top results and response times. Record the Pinecone results as a baseline, capture the Milvus results for the same queries with the same filters, and measure overlap at the top-k you use in production. Test index type choices such as HNSW, IVF, FLAT, SCANN or DiskANN, because each trades memory, build time and recall differently. Include edge cases like heavily filtered queries and recent writes. Agree the acceptance thresholds in writing before the test starts, so that the cutover decision rests on evidence.

Is an outside implementation partner worth it for this migration?

A partner is worth considering when the index count is high, the schema needs redesign, the deadline is fixed, or the internal team has no experience running a distributed stateful system. DeployOpen plans, implements, customizes, integrates, hardens, backs up, upgrades, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks, and most engagements are fixed-scope with deliverables and timelines agreed in writing before work starts. DeployOpen does not publish a price list, so request a quote built from your written scope. Ongoing support and continuous testing are available as retainers.

How DeployOpen scopes and runs the Milvus migration

DeployOpen plans, implements and hands over self-hosted Milvus inside your own infrastructure, including the export from Pinecone, collection and index design, bulk loading and a parallel-run comparison of recall and latency. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.

How we scope

  • Inventory every Pinecone index, namespace, dimension, metric and metadata field in use today
  • Agree which Milvus deployment mode fits the workload, such as Standalone or Distributed, in your environment
  • Define the recall and latency targets and the query workloads that the parallel run must cover
  • Record the cloud, data center or air-gapped boundaries, access model and sign-off owners in the written scope

How we build

  • Build the export path from Pinecone, using listed record IDs and fetches on serverless indexes
  • Design Milvus collections, partitions or partition keys, and schemas that mirror the tenant and metadata model
  • Configure authentication, TLS and role-based access control to match your identity and security standards
  • Run bulk loads, index creation and validation scripts, and test the chosen index type against your recall targets

How we hand over

  • Deliver a written runbook covering loading, index parameters, backups and the cutover steps
  • Document recall and latency results from the parallel run so your team can review them independently
  • Provide configuration records and access control settings that your compliance and security reviewers can examine
  • Run knowledge transfer sessions with the engineers who will operate the cluster after handover

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover
  • Retainers can cover Milvus version upgrades, index tuning as data volumes grow, and backup verification
  • Confirm with DeployOpen which support hours, response commitments and escalation paths apply before signing
  • Ask for the retainer scope in writing so upgrade and retest responsibilities are clear to both teams

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.