For AI agents: this page is also available as Markdown at /docs/quickstart.md. Every docs page is: add .md to its URL. llms.txt lists them all.

Quickstart

Create an account, load a few documents and run keyword, vector and hybrid queries, first in the console and then over the API.

1. Create an account

Sign up in the management console. Every account gets 1 GB of indexed data in one collection free, permanently.

A coding agent can do the setup for you: add the WarpSearch MCP server to its configuration and ask it to set up search for your data. Set up with your coding agent walks through it.

{
  "mcpServers": {
    "warpsearch": { "url": "https://api.warpsearch.io/mcp" }
  }
}

Without a key, the agent can only register you. You approve its request from an email, choose the organization and the role it gets (editor or admin lets it create collections), and the agent receives an API key. Nothing is created until you approve, and you can delete the agent's key under API keys at any time.

If you already have a key, send it with the connection instead: "headers": { "Authorization": "Bearer ws_..." }.

2. Create a collection and load documents

In the console, open Collections and create one (editors and admins can; the free plan includes one collection). Then open its Ingest tab and paste or upload a JSON array or NDJSON. To load documents from your own code, create an API key with the writer role under API keys.

Run a query from the collection's page in the console. If you already use an Elasticsearch, OpenSearch or Solr client, you can keep it; see Moving from Elasticsearch, OpenSearch or Solr.

4. Do the same over the API

Everything in the console is also available over HTTP. Create an API key under API keys (the writer role can load documents and search; creating collections needs editor), then export it:

export WARPSEARCH_API_KEY=ws_...

The examples use 4-dimensional vectors so they stay readable; real embeddings have hundreds or thousands of dimensions. WarpSearch does not compute embeddings, so you send the vectors yourself. See Vector search.

Create a collection with a vector field

curl -X PUT https://api.warpsearch.io/v1/collections/products \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "schema": {
      "fields": {
        "title":     { "parent": "_t" },
        "category":  "string",
        "embedding": { "type": "vector", "dims": 4, "metric": "cosine" }
      }
    }
  }'

"parent": "_t" gives title the built-in text analysis (word splitting, case and accent folding, English stemming). The schema can be JSON or YAML.

For Elasticsearch clients and tools:

curl -X PUT https://api.warpsearch.io/compat/es/products \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mappings": {
      "properties": {
        "title":     { "type": "text" },
        "category":  { "type": "keyword" },
        "embedding": { "type": "dense_vector", "dims": 4, "similarity": "cosine" }
      }
    }
  }'

For OpenSearch clients and tools:

curl -X PUT https://api.warpsearch.io/compat/opensearch/products \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "settings": { "index": { "knn": true } },
    "mappings": {
      "properties": {
        "title":     { "type": "text" },
        "category":  { "type": "keyword" },
        "embedding": { "type": "knn_vector", "dimension": 4,
                       "method": { "name": "hnsw", "space_type": "cosinesimil" } }
      }
    }
  }'

Collection names start with a lowercase letter and contain only lowercase letters, digits and _. See Collections and Schemas and field types.

Ingest documents with vectors

Send NDJSON (one document per line) or a JSON array. Add commit=true to make the documents searchable before the request returns.

curl -X POST "https://api.warpsearch.io/v1/collections/products/documents?commit=true" \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/x-ndjson" \
  --data-binary @- <<'DOCS'
{"id":"1","title":"Espresso machine with milk frother","category":"kitchen","embedding":[0.9,0.1,0.0,0.1]}
{"id":"2","title":"Burr coffee grinder","category":"kitchen","embedding":[0.8,0.2,0.1,0.0]}
{"id":"3","title":"Trail running shoes","category":"outdoor","embedding":[0.0,0.1,0.9,0.2]}
DOCS

The response reports indexed and failed counts.

The _bulk API, for Elasticsearch and OpenSearch clients (use /compat/opensearch for the latter). refresh=true makes the documents searchable before the call returns:

curl -X POST "https://api.warpsearch.io/compat/es/products/_bulk?refresh=true" \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/x-ndjson" \
  --data-binary @- <<'DOCS'
{"index":{"_id":"1"}}
{"title":"Espresso machine with milk frother","category":"kitchen","embedding":[0.9,0.1,0.0,0.1]}
{"index":{"_id":"2"}}
{"title":"Burr coffee grinder","category":"kitchen","embedding":[0.8,0.2,0.1,0.0]}
{"index":{"_id":"3"}}
{"title":"Trail running shoes","category":"outdoor","embedding":[0.0,0.1,0.9,0.2]}
DOCS

See Ingesting documents.

A search request's language is text by default (the words a person typed, matched forgivingly); lucene, sql, es (Elasticsearch Query DSL), solr and others are a field away. limit, offset, fields, filters, sort and facets work the same in all of them. See Searching and Query languages.

curl -X POST https://api.warpsearch.io/v1/search/products \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "language": "lucene", "query": "title:coffee", "limit": 10 }'
curl -X POST https://api.warpsearch.io/compat/es/products/_search \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": { "match": { "title": "coffee" } }, "size": 10 }'
curl "https://api.warpsearch.io/compat/solr/products/select?q=title:coffee&rows=10" \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY"

Pass a query vector computed with the same model as your documents. On the WarpSearch API, write it as a knn section with "language": "es" (query then holds an Elasticsearch search body), or in SQL with ORDER BY on the <=> distance operator ("language": "pgsql"). filters restrict the matches.

curl -X POST https://api.warpsearch.io/v1/search/products \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "language": "es",
    "query": {
      "knn": { "field": "embedding", "query_vector": [0.85, 0.15, 0.05, 0.05], "k": 10 }
    },
    "filters": [ { "term": { "category": "kitchen" } } ],
    "limit": 10
  }'

The same search in SQL:

curl -X POST https://api.warpsearch.io/v1/search/products \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{"language": "pgsql",
 "query": "SELECT id, title FROM products WHERE category = 'kitchen' ORDER BY embedding <=> '[0.85,0.15,0.05,0.05]' LIMIT 10"}
JSON
curl -X POST https://api.warpsearch.io/compat/es/products/_search \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "knn": { "field": "embedding", "query_vector": [0.85, 0.15, 0.05, 0.05], "k": 10,
             "filter": { "term": { "category": "kitchen" } } },
    "size": 10
  }'
curl -X POST https://api.warpsearch.io/compat/opensearch/products/_search \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": { "knn": { "embedding": { "vector": [0.85, 0.15, 0.05, 0.05], "k": 10,
                                       "filter": { "term": { "category": "kitchen" } } } } },
    "size": 10
  }'

To combine a text query and a vector search in one request, put a knn section beside query:

curl -X POST https://api.warpsearch.io/v1/search/products \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "language": "es",
    "query": {
      "query": { "match": { "title": "coffee" } },
      "knn": { "field": "embedding", "query_vector": [0.85, 0.15, 0.05, 0.05], "k": 10 }
    },
    "limit": 10
  }'
curl -X POST https://api.warpsearch.io/compat/es/products/_search \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": { "match": { "title": "coffee" } },
    "knn": { "field": "embedding", "query_vector": [0.85, 0.15, 0.05, 0.05], "k": 10 },
    "size": 10
  }'

A document matches when either part does, and its score is the sum of both scores. Each part can carry its own boost, and a filter inside knn restricts the vector candidates. For this and for rank fusion (RRF), see Hybrid search.

Next steps

View this page as Markdown

Cookie settings

Optional tracking stays off until you choose it. Your choice applies to this browser for 180 days. Read the details.

Essential storage keeps you signed in, protects forms, and remembers this choice. It is always available.