Vespa CloudThis content is applicable to Vespa Cloud deployments.
Migrating from Elasticsearch
This is a guide for how to move data from Elasticsearch to Vespa.
By the end of this guide you will have exported documents from Elasticsearch,
generated a deployable Vespa application package and tested this with documents and queries.
Prerequisites:
Linux, macOS or Windows 10 Pro on x86_64 or arm64,
with Podman Desktop or
Docker Desktop installed, with an engine running.
This section sets up an index with 1000 sample documents using
getting-started-index.
Skip this part if you already have an index.
Wait for Elasticsearch to start:
This guide uses ElasticDump
to export the index contents and the index mapping.
Export the documents and mappings, then delete the Docker network and the Elasticsearch container:
ES_Vespa_parser.py
is provided for conversion of Elasticsearch data and index mappings to Vespa data and configuration.
It is a basic script with minimal error checking -
it is designed for a simple export, modify this as needed for your application's needs.
Generate Vespa documents and configuration:
This generates documents in documents.json
(see JSON format)
where each document has IDs like this id:bank:_doc::1.
It also generates a bank folder with an application package:
Read more in Documents and
Schemas.
The schema is the key Vespa configuration file where field types
and ranking are configured.
The schema (found in schemas/_doc.sd) also has
indexing settings, example:
These settings impact both performance and how fields are matched.
For example, the account_number above is using the attribute keyword,
which makes the field available for sorting,
ranking, grouping,
but which by default does not have data structures for fast search.
Read more in attributes and
practical search performance guide.
Test with local deployment
To run the steps above, using a local deployment,
follow the steps in the quickstart
to start a local container running Vespa.
Then, deploy the application package from the bank folder.