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

Query languages

WarpSearch accepts queries in the languages you already use. Choose one per request with the language field of the search API, or point an existing Elasticsearch, OpenSearch or Solr client at a compatible base URL. Every language runs on the same collection and engine, so you can mix them: SQL in a dashboard, Query DSL from an older service, Lucene in a search box.

Language language Compatible base URL Details
Search-box text with typo tolerance, synonyms and rules text (default) Synonyms, rules and ranking settings
Lucene query syntax lucene Below
SQL, MySQL dialect sql SQL and PostgreSQL
SQL, PostgreSQL dialect, with full-text search and pgvector pgsql SQL and PostgreSQL
Elasticsearch Query DSL es https://api.warpsearch.io/compat/es Elasticsearch
OpenSearch Query DSL es https://api.warpsearch.io/compat/opensearch OpenSearch
Solr parameters and JSON Request API solr https://api.warpsearch.io/compat/solr/{collection} Solr
LogQL logql LogQL
Grafana Elasticsearch data source targets grafana Grafana
WarpSearch native expressions warpsearch Native queries
PPL pipelines over one or more collections ppl PPL, Multi-collection queries
Elasticsearch ES|QL subset esql https://api.warpsearch.io/compat/es/_query ES|QL
Read-only openCypher subset cypher Graph queries

ES|QL and PPL are separate dialects.

Sending a query

curl -X POST https://api.warpsearch.io/v1/search/books \
  -H "Authorization: Bearer $WARPSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"language": "sql", "query": "SELECT title, year FROM books WHERE year > 1960 ORDER BY year DESC LIMIT 5"}'

How queries are translated

Query support follows these rules:

Warnings appear in the response's warnings array. Compatible endpoints also send a Warning: 299 header. Regex and wildcard queries depend on your plan and return 403 forbidden when it excludes them. See Limits and errors.

See the translation

Add "include_translation": true to a search and its response carries translation: the translated query, the request details, any warnings, and a replay (below). The MCP translate_query tool returns the same without running the search. Use it to see how an unfamiliar language handled your query, or to check for approximations before you tune relevance.

Native queries and replays

The translation also includes a replay: the same request in the warpsearch language, with a signature. Send it to /v1/search/{c} unchanged and translation is skipped. Searches with no native form, such as kNN and geo queries, return a warning instead of a replay. See Geo search. A highlighted search's replay keeps its highlight; see Replaying a highlighted search.

You can also write warpsearch queries yourself. User values are bound through vars and are never parsed as syntax:

{"language": "warpsearch",
 "collection": "books",
 "query": "title:$q AND year:>=1960",
 "vars": {"q": "dune"}}

Filters in a warpsearch request are expressions too, either strings or {"q": ..., "vars": {...}}. Collections with row filters or field restrictions accept only signed replays. Changing the collection's access policy or your plan invalidates old signatures.

The warpsearch language also has rescore, which replaces a query's scores with your own formula over the document's fields. See Scoring expressions.

Lucene

Choose language: "lucene" for Lucene query_string syntax, as typed into Kibana or Grafana. The default language is search-box text. Bare terms search the collection's default fields.

{"language": "lucene",
 "query": "title:dune AND year:[1960 TO 1980] -status:draft author:herb* name:smith~1 \"exact phrase\"~2 _exists_:isbn price:>=10"}

? and * are wildcards, a single trailing * is a prefix query, and /re/ is a regular expression. For a one-line search, use GET /compat/es/{c}/_search?q=...; native searches use POST.

Grafana

grafana takes the target model of Grafana's Elasticsearch data source: query, metrics and bucketAggs, usually with time_range. A date_histogram with interval: auto picks a round bucket width that yields about 100 buckets. To connect Grafana itself, use its Elasticsearch or OpenSearch data source with the compatible base URL.

Moving from Elasticsearch, OpenSearch or Solr

Most applications move by changing the base URL and the credential. First check whether yours depends on anything below.

Feature On WarpSearch
Paging Field-sort search_after, native cursors, Solr cursorMark and emulated scroll work. No point-in-time snapshot or slices. See Paging
Dynamic mapping Supported on Elasticsearch/OpenSearch-created collections, including strict/disabled modes and dynamic templates. Native schemas still require field definitions or suffixes
Nested and parent/child documents See nested document behavior and REST API limitations. Elasticsearch join fields remain unsupported
Partial updates and query-based writes Native PATCH, _update and bulk partial updates work with concurrency restrictions. Update/delete by query, _reindex and ingest pipelines remain unsupported
Index lists (books,articles) Supported on the Elasticsearch and OpenSearch endpoints; results are merged. See Several indices.
Index resolution Index lists, patterns, exclusions and _all work. No index aliases. Data streams map to one collection without rollover
Highlighting Supported: native highlight, Elasticsearch/OpenSearch highlight, Solr hl. See Highlighting.
Scripts, ingest pipelines, more-like-this Unsupported. Compatibility suggesters are supported with limits; see Suggesters
Kibana, OpenSearch Dashboards Not supported. Use Grafana with its Elasticsearch or OpenSearch data source.
Relevance scores Not identical. Analysis differences and documented approximations can change matches and ranking as well as _score. Compare matching documents and rank order.

Full lists are on each language page.

Migration checklist

  1. Replay real queries. Run a day of production queries, or your test suite, against a WarpSearch collection. Log every Warning: 299 header and every 400 unsupported_feature. That list is your migration work.

  2. Create the collection and fields before loading data. Send your Elasticsearch or OpenSearch mapping to the compatible PUT /{index}, or define a WarpSearch schema with PUT /v1/collections/{name}. On the compatible endpoints, field names containing dots or @ are renamed for you; queries keep using your original names.

  3. Load the data. Export as you do today (scroll, a snapshot reader, or your source database) and send it through _bulk, Solr /update or the ingest API. Include your existing vectors; WarpSearch does not create embeddings. After a large load, call _refresh and _forcemerge, which also builds the approximate vector indexes.

  4. Switch the client. Usually just the base URL and the credential:

    - es = Elasticsearch("https://my-cluster.example.com:9200", basic_auth=("user", "pass"))
    + es = Elasticsearch("https://api.warpsearch.io/compat/es", api_key="ws_...")
    

    Create the key in the management console. Basic authentication accepts username apikey and the key as password. Authorization: ApiKey and Authorization: Bearer also work. Per-client settings are on the Elasticsearch, OpenSearch and Solr pages.

  5. Run both side by side. Send the same queries to the old cluster and to WarpSearch and compare top results. Writes can go to both meanwhile.

  6. Cut over. Turn the old cluster off when you are satisfied.

Cold starts and cost

ESQL

Use "language": "esql" with a pipeline string on /v1/search, or send {"query": "..."} to /compat/es/_query (also available under /compat/opensearch). This is a bounded ES|QL subset, including FROM, WHERE, STATS, SORT and LIMIT; it is distinct from the PPL dialect. Native responses use hits and columns; the compatible endpoint returns columns and values. For example:

{"language": "esql", "query": "FROM books | STATS count = COUNT(*) BY genre | SORT count DESC | LIMIT 10"}

The _query/async compatibility route completes synchronously and does not retain an async result. Unsupported commands and functions fail; this is not full Elasticsearch ES|QL parity.

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.