CLI migration tool

migrate2vespa: plan an Elasticsearch or OpenSearch migration to Vespa

migrate2vespa is an open-source Python CLI developed by Searchplex for planning Elasticsearch and OpenSearch migrations to Vespa.ai. Give it a mapping, and it creates a reviewable migration manifest and generates a starter Vespa application for the parts it can convert safely.

Getting started

What it needs from you

A mapping is enough to start. Add settings, sample documents, and representative queries for a better plan. Settings describe analyzers and normalizers. Documents show value shapes and arrays. Queries show which fields are searched, filtered, sorted, aggregated, or used for nearest-neighbor search.

es-app/
├── mapping.jsonrequired
├── settings.jsonoptional
├── documents.jsonlrecommended
└── queries/recommended

The tool works from these local files only. It does not connect to your Elasticsearch or OpenSearch cluster.

$ python3 -m pip install migrate2vespa
$ migrate2vespa ./es-app

View migrate2vespa on PyPI

How it works

Two stages, in order

The tool writes the manifest first and generates from the plan recorded there. Run both stages with one command, or use --analyze-only to review the manifest before generating the Vespa application.

01

Build the migration manifest

migrate2vespa records the source field, observed usage, required behavior, proposed Vespa field, and anything that still needs attention.

Every supplied field, query, and document line is accounted for — so unsupported or unfamiliar constructs are recorded, not silently dropped.

Each field or query finding receives one of four decisions:

DIRECT

Maps cleanly to a Vespa field.

ADAPT

Needs a known conversion.

REVIEW

Needs a person to confirm the plan.

REDESIGN

Needs a different design in Vespa.

migration-manifest.yamlexcerpt

# adapted from fixtures/quickstart in the repository

fields:

sku:

source: keyword

decision: DIRECT

price:

source: double

decision: DIRECT

title.raw:

source: multi-field on title

decision: ADAPT

embedding:

source: dense_vector, dims: 8

decision: ADAPT

The manifest keeps the evidence and rule behind each decision.
02

Generate what's safe

migrate2vespa uses the manifest to build the fields it can convert safely. Anything left out remains listed in the manifest.

Package outcomeREADYcompletePARTIALsafe omissions recordedBLOCKEDno application produced

Generated packages include the Vespa schema and service configuration, plus a sample feed when documents were supplied.

Last step

Deploy the generated application

When generation succeeds, migrate2vespa prints the Vespa CLI command for the package it just built.

# printed at the end of a successful run
$ vespa deploy --wait 600 ./es-app/out/vespa-app

migrate2vespa does not deploy or feed the application. Validate the generated package with representative data and queries before using it in production.

How it runs

Local and deterministic, by design

Nothing leaves your machine

No Elasticsearch, OpenSearch, or Vespa cluster connection, and no calls to any AI model — only local files in, local files out.

Same inputs, same plan

The planner is rule-based. The same mapping, documents, and queries produce the same manifest, with every decision traceable to a rule.

No hidden guesses

Constructs the tool doesn't recognize are recorded for review or redesign, never silently approximated.

The talk Patterns from Shipped Migrations explains why the repeatable inventory and translation work is worth automating, while Vespa-native schema, ranking, and production design still require engineering judgment.

Current scope

What it converts today

The current release supports a focused set of common Elasticsearch and OpenSearch constructs.

Fields

Text, keyword, boolean, core numeric types, recognized dates, multi-fields, observed arrays, and dimensioned float vectors.

Query evidence

Match, phrase, term, terms, range, sort, basic aggregations, and kNN. Custom scoring is recorded for redesign.

Text analysis

Default and known Lucene analysis, plus lowercase-only normalizers. Custom analysis remains visible for review.

Compatibility is based on the constructs listed above, not a blanket Elasticsearch or OpenSearch version claim. Unknown constructs remain visible in the manifest.

The rule set is intended to expand. Source parsing is also separate from Vespa package generation, so support for other source engines can be added without replacing the generator. Contributions are welcome. Follow the project on GitHub for new releases and expanded migration coverage.

FAQ

migrate2vespa — common questions

Answers about query evidence, CI use, AI-assisted review, and what remains before production deployment.

Next step

Need help taking the plan to production?

migrate2vespa produces a reviewable starter. Workload validation, ranking design, and cutover still need engineering judgment — Searchplex can help with that.