> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mixpeek.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate from another database

> Move a search workload from Elasticsearch, Pinecone or Weaviate to Mixpeek: map the concepts, bring your vectors or re-index your files, translate queries.

Move a search workload from Elasticsearch, Pinecone or Weaviate to Mixpeek, then check that the new results match or beat the old ones on your own queries.

**Prerequisites**

* A Mixpeek API key in `MIXPEEK_API_KEY`.
* Read access to your current index, and to the source files behind it if you plan to re-index them.
* 20 or more real queries with the results you expect, to compare before and after.

## Map the concepts

| Elasticsearch | Pinecone | Weaviate | Mixpeek |
| - | - | - | - |
| Cluster or index | Index | Instance or class | [Namespace](https://docs.mixpeek.com/docs/manage/namespaces.md) |
| Index per data type | Pinecone namespace | Class | [Collection](https://docs.mixpeek.com/docs/extract/collections.md), or a field you filter on |
| Document | Vector with metadata | Object with vector | Document: features, your fields, and lineage to its source file |
| Mapping | Index dimension and metric | Class schema and properties | Bucket schema, plus the features a collection extracts |
| Ingest pipeline, embedding done outside | Embedding done outside | Vectorizer module (`text2vec-*`) | Extractor run by the collection, or your own vectors |
| Query DSL, `bool` query | `query` with `vector` and `filter` | GraphQL `Get` with `nearText` and `where` | [Retriever](https://docs.mixpeek.com/docs/retrieve/retrievers.md) with [stages](https://docs.mixpeek.com/docs/retrieve/stages.md) |
| `knn`, `match`, BM25 | Top-k vector query | `nearText`, `nearVector`, `bm25`, `hybrid` | `feature_search` stage (vector, keyword or both) |
| `filter` clause | Metadata filter | `where` filter | `attribute_filter` stage |
| Aggregations | none | Aggregate | `POST /v1/collections/{collection_id}/documents/aggregate`, [taxonomies](https://docs.mixpeek.com/docs/enrich/taxonomies.md), [clusters](https://docs.mixpeek.com/docs/enrich/clusters.md) |
| Cross-index lookup | none | Cross-reference | Join stages and taxonomies |

## Choose a path

| Path | When | What you keep |
| - | - | - |
| **Bring your vectors** | You want to move fast, your embeddings are good, and you query by vector | Your vectors and metadata, as-is. Search runs on Mixpeek retrievers |
| **Re-index your files** | You have the source files (video, images, PDFs, text) and want Mixpeek to extract features | Nothing from the old index. Mixpeek extracts embeddings, transcripts, OCR and faces from the files |

You can start with the first path and move to the second later: promoting a standalone namespace to managed keeps its documents and maps its vector indexes to Mixpeek models.

## Bring your vectors

**1. Create a standalone namespace**

A standalone namespace holds vectors you computed yourself. Declare each vector's name, dimension and metric, or let the first upsert infer them. See [Bring your own vectors](https://docs.mixpeek.com/docs/manage/vector-store.md) for the create call.

**2. Export from the old index and upsert**

Read your records in pages and write up to 1,000 documents per call. Put the old record id in `document_id` and its metadata in `payload`.

```bash cURL theme={null}
curl -X POST "https://api.mixpeek.com/v1/namespaces/$NAMESPACE_ID/documents/upsert" \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"documents": [{"document_id": "sku-001", "vectors": {"embedding": [0.12, -0.34, 0.56]}, "payload": {"category": "footwear"}}]}'
```

The response lists `inserted`, `document_ids`, and any `unsearchable_document_ids` or `warnings`. Check them on every page of the export.

**3. Create a retriever and query it**

A `feature_search` stage names the vector by the name you upserted (`embedding`) and takes the query vector as an input. [Bring your own vectors](https://docs.mixpeek.com/docs/manage/vector-store.md) has the retriever and the read-your-writes option.

## Re-index your files

**1. Start from a template or a manifest**

Pick the [template](https://docs.mixpeek.com/docs/templates/overview.md) closest to your data, or write a [manifest](https://docs.mixpeek.com/docs/manage/manifests.md) with one bucket, one collection per kind of file, and a retriever. `POST /v1/manifest/apply` creates them in one call. The [Quickstart](https://docs.mixpeek.com/docs/overview/quickstart.md) shows the apply call.

**2. Load the source files**

Point a sync at the bucket or folder that holds the files: S3, GCS, Azure Blob and others. See [Object storage and syncs](https://docs.mixpeek.com/docs/ingest/object-storage.md). Copy each record's metadata onto the object as bucket fields so filters keep working, and pass them through to documents with `field_passthrough` on the collection.

**3. Translate each query into a retriever**

One retriever per query shape. Search goes first, filters after, ranking last.

```bash cURL theme={null}
curl -X POST https://api.mixpeek.com/v1/retrievers \
  -H "Authorization: Bearer $MIXPEEK_API_KEY" \
  -H "X-Namespace: $NAMESPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "retriever_name": "product-search",
    "collection_identifiers": ["products"],
    "input_schema": {"query": {"type": "text", "required": true}, "category": {"type": "text", "required": true}},
    "stages": [
      {"stage_name": "search", "stage_type": "filter", "config": {"stage_id": "feature_search", "parameters": {
        "searches": [{"feature_uri": "mixpeek://multimodal_extractor@v1/vertex_multimodal_embedding",
                      "query": {"input_mode": "text", "value": "{{INPUT.query}}"}, "top_k": 50}],
        "final_top_k": 50}}},
      {"stage_name": "category", "stage_type": "filter", "config": {"stage_id": "attribute_filter", "parameters": {
        "field": "category", "operator": "eq", "value": "{{INPUT.category}}"}}}
    ]
  }'
```

Read the collection's real feature URIs from `GET /v1/collections/{collection_id}/features` and use those in `feature_uri`.

> [accordion] Elasticsearch queries
>
> | Elasticsearch | Mixpeek stage |
> | - | - |
> | `match`, `multi_match` (BM25) | `feature_search` with a keyword search |
> | `knn` on `dense_vector` | `feature_search` with a vector search |
> | `bool` with `must` and `should` | `feature_search` with several searches and a fusion method such as `rrf` |
> | `bool.filter`, `term`, `range` | `attribute_filter` |
> | `sort` | `sort_attribute` |
> | `collapse` | Grouping stage |
> | Aggregations | `POST /v1/collections/{collection_id}/documents/aggregate` |
> | ILM hot, warm and cold tiers | [Storage, tiering and backups](https://docs.mixpeek.com/docs/manage/storage.md) |

> [accordion] Pinecone queries
>
> | Pinecone | Mixpeek |
> | - | - |
> | `index.query(vector=..., top_k=10)` | `feature_search` with `input_mode: "vector"`, or `input_mode: "text"` when Mixpeek embeds the query |
> | `filter={"category": "footwear"}` | `attribute_filter` with `field`, `operator` and `value` |
> | `include_metadata=True` | Fields come back on each document by default |
> | Pinecone namespaces for tenants | One Mixpeek namespace per tenant, or a tenant field plus [document-level access](https://docs.mixpeek.com/docs/production/security.md) |

> [accordion] Weaviate queries
>
> | Weaviate | Mixpeek |
> | - | - |
> | `nearText` | `feature_search` with `input_mode: "text"` |
> | `nearVector` | `feature_search` with `input_mode: "vector"` |
> | `hybrid`, `bm25` | `feature_search` with keyword and vector searches fused |
> | `where` | `attribute_filter` |
> | Vectorizer module per class | The collection's extractor |
> | Cross-references | Join stages, or a [taxonomy](https://docs.mixpeek.com/docs/enrich/taxonomies.md) against a reference collection |

## Check that it worked

Run your saved queries against both systems and compare the top 10 for each. Two numbers settle it: how many expected results each system returns in its top 10, and the latency at the 95th percentile. [Tune relevance](https://docs.mixpeek.com/docs/retrieve/relevance.md) shows how to store the queries as an evaluation dataset so the comparison reruns on every change. Count documents per collection against the old index before you cut traffic over.

## What goes wrong

| Symptom | Cause | Fix |
| - | - | - |
| Fewer documents than the old index | Some upserts were refused, or a batch finished `COMPLETED_WITH_ERRORS` | Read `unsearchable_document_ids` and `warnings` on each upsert, or the failed items on the batch. |
| Filters match nothing | The field was not copied onto documents | Add it to the bucket schema and to the collection's `field_passthrough`, then reprocess. |
| Vector search scores look random | Query and index vectors come from different models, or the metric differs | Embed queries with the model that made the index, and declare the same metric. |
| A retriever returns HTTP 200 with no documents | The run was degraded | Read `status` and `warnings` before trusting an empty `documents`. |
| Text queries fail on a standalone namespace | Its vector index has no model mapped to it | Query with `input_mode: "vector"`, or promote the namespace and map the index to a model. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.