For AI agents: this page is also available as Markdown at /docs/compat-solr.md. Every docs page is: add .md to its URL. llms.txt lists them all.
Solr
WarpSearch runs Solr searches: the standard, dismax and edismax parsers, local params, filter queries, function queries, classic and JSON faceting, stats and grouping. It serves the Solr HTTP API at this collection URL:
https://api.warpsearch.io/compat/solr/{collection}
The collection name takes the place of the Solr core or collection in your existing URLs. Responses come back in Solr's JSON shapes, or in javabin, SolrJ's default format, when the request says wt=javabin.
Approximations are reported in a Warning: 299 header and in responseHeader.warnings. Unsupported features fail with 400 in Solr's error shape, with a metadata entry naming unsupported_feature (see how queries are translated). Parameters that only tune performance or routing (cache, cost, facet.method, distrib, shards.*, indent) are accepted silently; other parameters WarpSearch does not read produce a warning.
The same Solr parameters can be sent to WarpSearch's own search API with "language": "solr", as a query string or a JSON Request API object:
{"language": "solr",
"collection": "books",
"query": "q=dune messiah&defType=edismax&qf=title_t^2 body_t&mm=2&fq={!tag=g}genre_s:scifi&facet=true&facet.field={!ex=g}genre_s"}
curl "https://api.warpsearch.io/compat/solr/books/select" \
-H "Authorization: Bearer $WARPSEARCH_API_KEY" \
--data-urlencode "q=dune messiah" \
--data-urlencode "defType=edismax" \
--data-urlencode "qf=title_t^2 body_t" \
--data-urlencode "mm=2" \
--data-urlencode "fq={!tag=g}genre_s:scifi" \
--data-urlencode "facet=true" \
--data-urlencode "facet.field={!ex=g}genre_s"
#Support at a glance
| Area | Support |
|---|---|
| Searches | /select, /query, standard/dismax/edismax parsers, filter and function queries |
| Faceting and statistics | Classic facets, JSON Facet API, stats and field-sorted grouping, with the limits below |
| Vector search | {!knn} with filter queries applied to candidates |
| Documents | JSON and javabin adds, delete by ID, commit, optimize and committed-document lookup |
| Schema | Supported field, dynamic-field and field-type commands; create the collection first |
| Paging | start/rows and field-sorted cursorMark, without a snapshot |
| Highlighting and suggestions | Highlighting, /suggest, /terms and search spellcheck |
| Cluster administration | No SolrCloud management, ZooKeeper discovery, core administration or configset APIs |
#Connect
Create an API key in the management console. Send it as Authorization: Bearer ws_..., Authorization: ApiKey ws_... or X-API-Key.
HTTP Basic also accepts the key as the password with username apikey or an empty username. Other usernames must match the actor associated with the key.
Use https://api.warpsearch.io/compat/solr as the base URL and append /{collection}. Create the collection first in the console or with the Collections API. The examples below assume books has title_t, year_i and genre_s fields.
Client and tool connection settings
| Client | Base URL and authentication |
|---|---|
SolrJ 9 Http2SolrClient | https://api.warpsearch.io/compat/solr with withDefaultCollection("books") and withBasicAuthCredentials("apikey", "ws_..."); JSON and default javabin are supported |
| pysolr | Collection URL, with auth=("apikey", "ws_...") |
| Solarium (PHP) | host api.warpsearch.io, port 443, scheme https, path /compat, core books; Solarium adds the solr context. Configure a default API-key header or Basic credentials |
| rsolr, SolrNet | Collection URL; configure a default API-key header or Basic credentials on the HTTP client |
SolrJ 9 can send the key as a Basic-auth password:
try (Http2SolrClient solr = new Http2SolrClient.Builder("https://api.warpsearch.io/compat/solr")
.withDefaultCollection("books")
.withBasicAuthCredentials("apikey", "ws_...")
.build()) {
QueryResponse response = solr.query(new SolrQuery("title_t:dune"));
}
The default javabin parser and request writer are supported. Http2SolrClient supports both HTTP/2 and HTTP/1.1; set .useHttp1_1(true) when a proxy requires HTTP/1.1. See the SolrJ builder options. Use an HTTP client with the explicit gateway URL, rather than a ZooKeeper-discovering client.
import pysolr
solr = pysolr.Solr(
"https://api.warpsearch.io/compat/solr/books",
auth=("apikey", "ws_..."),
always_commit=True,
)
results = solr.search("title_t:dune", rows=10)
The pysolr authentication option accepts a username/password tuple, so no custom HTTP session is needed.
curl -s "https://api.warpsearch.io/compat/solr/books/select" \
-H "Authorization: Bearer ws_..." \
--data-urlencode "q=title_t:dune AND year_i:[1960 TO *]" \
--data-urlencode "fq=genre_s:scifi" \
--data-urlencode "rows=10" \
--data-urlencode "fl=id,title_t,score"
#Endpoints
Paths below are relative to the collection URL shown in Connect.
| Endpoint | Methods | Notes |
|---|---|---|
/select, /query | GET, POST | Search. Parameters or a JSON Request API body |
/get | GET, POST | Lookup by id or ids, with fl and fq; committed documents only |
/suggest, /terms | GET, POST | Suggestions and dictionary terms; spellcheck can also accompany search |
/schema | POST | Supported add/replace field, dynamic-field and field-type commands |
/update, /update/json | POST | JSON documents, one document, or command objects. /update also takes SolrJ's javabin bodies, and parameters alone (SolrJ's commit() and optimize()) |
/update/json/docs | POST | One document. split and f mappings are rejected |
/schema/fields, /schema/uniquekey | GET | Read only |
/admin/ping | GET | Health check |
Role needs follow Solr's split: a viewer searches and gets, a writer also updates and commits, an editor also runs optimize.
#Query parsers and parameters
| Feature | Support |
|---|---|
Standard (Lucene) q | Fields, AND OR NOT, + -, phrases with slop, ^boost, ^=score, ~ fuzzy, wildcards, /regex/, ranges, Solr date math, [* TO *] |
df, q.op, defType, q.alt | Exact |
Local params and $param references | {!type k=v}, _query_, _val_ |
fq | Several filters, with {!tag=t}, cache, cost |
dismax and edismax | qf, tie, mm, pf, pf2, pf3, ps, qs, bq, bf, boost. Best field plus tie times the others; phrase and boost clauses also contribute |
field, term, raw, terms, prefix, bool, simple | Supported |
func, frange, boost | Supported |
geofilt, bbox | Exact. Scoring options other than score=none are rejected |
knn | {!knn f=embedding topK=10}[0.1, 0.2, ...], with fq filtering candidates first |
rq={!rerank ...} | The rerank query is added as a boosted clause. Whole result set is rescored, not just the top reRankDocs |
sort | Fields, score, functions, geodist() and field(f,min|max) for multi-valued fields. Documents with no value sort last |
start, rows, fl | Names, globs, score, alias:field |
timeAllowed | Ignored with a warning; the gateway applies the plan timeout and does not return partial results |
TZ, NOW | Time zone and request-time overrides for date math |
wt | json and javabin |
Fields are the collection's fields. A field that is not mapped must carry a type suffix in its name such as _t for text, _s for string, _i for integer, _f for float, _d for double or _dt for date, as in the Solr default configset. See Schemas and field types. Queries on the catch-all _text_ field need a real field behind it; set the collection's default fields instead.
Function queries support arithmetic, log, ln, exp, pow, sqrt, abs, min, max, floor, ceil, recip, linear, map, def, field, if, comparisons, logic, ms() and geodist(). rint rounds half up, where Solr rounds half to even, and warns.
Not supported: term and index statistics in functions (
tf,idf,termfreq,docfreq,norm,maxdoc),query(),ord,scale, trigonometric functions, string distance, and string literals.{!ltr},maxscore, join, graph and block-join parsers, and{!collapse}.
Field-score combination uses disjunction-max; underlying BM25 statistics and analysis can still differ from Solr.
#Faceting and statistics
Classic facets and the JSON Facet API both work.
| Feature | Support |
|---|---|
facet.field | facet.limit, facet.mincount, facet.missing, facet.offset, per-field f.<field>.*, {!key ex} exclusions |
facet.sort=index | Exact, up to your plan's facet size. Fails if the field has more values than that |
facet.query, facet.interval | Exact |
facet.range | start, end, gap as number or date math, hardend, other, include, mincount |
facet.pivot | Nested facets with per-bucket stats. Levels must be string or id fields |
stats.field | min max sum count missing sumOfSquares mean stddev percentiles, tags and exclusions |
| JSON Facet API | terms, query, range, domain (filter, query, excludeTags), nested facet, sort, numBuckets, allBuckets, statistics such as avg, sum, unique, hll, percentile. Write json.facet as strict JSON with quoted keys |
group.field, group.query | One field sort, group.limit, group.offset, group.format=simple, group.main, group.ngroups (approximate, with a warning) |
Counts such as unique(), countDistinct, numBuckets and group.ngroups are approximate, with a warning where Solr would be exact. On numeric and date fields, zero-count terms are not listed, so facet.mincount=0 behaves like 1 with a warning.
facet.prefix, facet.contains, facet.matches and facet.excludeTerms are unsupported. For prefix enumeration, use /terms with terms.prefix, or use /suggest for autocomplete.
Not supported: heatmaps,
relatedness(),uniqueBlock(), sub-facets under numeric or text facets, and sorting facets by derived or sketch statistics. Grouping by relevance (the default sort), several sort keys,group.func,group.facetandgroup.truncateare rejected, so set an explicit fieldsortwhen you usegroup=true.
#Updating documents
Send a JSON array of documents, a single document, or command objects:
curl -s "https://api.warpsearch.io/compat/solr/books/update?commit=true" \
-H "Authorization: Bearer ws_..." \
-H "Content-Type: application/json" \
-d '[{"id": "1", "title_t": "Dune", "year_i": 1965}]'
{
"add": {"doc": {"id": "2", "title_t": "Dune Messiah"}},
"delete": {"id": "1"},
"commit": {}
}
SolrJ sends the same operations in javabin: add, deleteById, commit() and optimize() need no changes.
Supported: add, delete by ID, commit, softCommit, commitWithin, request-level overwrite=false and optimize. By default, an existing ID is replaced; overwrite=false allows duplicate IDs and is not a create-if-absent check. If a batch contains an invalid document, other documents may already have been written; the request is not transactional.
commit and softCommit both request a commit; they do not reproduce Solr's separate hard/soft-commit lifecycle. Without an explicit commit, visibility follows the collection's durability and commit settings. /get reads committed documents, not uncommitted updates. See Consistency and durability.
Not supported: delete by query (SolrJ's
deleteByQuery), atomic and in-place updates (set,inc,add,remove),_version_concurrency, child documents, per-documentcommitWithinandoverwrite(set them on the request), XML and CSV bodies, update processor chains,rollback, and document boosts.
#Schema and ping
/schema/fields and /schema/uniquekey are read only. Field types are reported as Solr names: text_general, string, plong, pfloat, pdouble, pdate, location and knn_vector. Create the collection with a schema through the console or the Collections API, then point Solr clients at it.
POST /compat/solr/{collection}/schema accepts the Solr Schema API commands add-field, replace-field, add-dynamic-field, replace-dynamic-field, add-field-type and replace-field-type, and needs the editor role. Fields can use the language types of the default configset, such as text_de, text_ar, text_ja or text_fa, and field types you define with Solr's tokenizer and filter factories (n-gram, shingle, word delimiter, phonetic, Japanese, Korean, pattern and others, with Solr's parameter names); see Languages and text analysis. Factories that read a file, such as synonym and stop word files, are dropped with a warning. A dynamic field pattern must be a suffix such as *_attr, which becomes the template _attr in the WarpSearch schema. The same change rules apply as for the WarpSearch schema API, so a change that would break indexed data is refused. Other commands (delete-*, copy fields) are refused.
curl -s -X POST "https://api.warpsearch.io/compat/solr/books/schema" \
-H "Authorization: Bearer ws_..." \
-H "Content-Type: application/json" \
-d '{"add-field": {"name": "rating", "type": "pfloat"},
"add-dynamic-field": {"name": "*_attr", "type": "string"}}'
The accepted types are string, strings, text_general, text_en, text_ws, int, pint, plong, long, float, pfloat, double, pdouble, date, pdate, the plural forms pints, plongs, pfloats, pdoubles, pdates, boolean, booleans, location and knn_vector (with vectorDimension and similarityFunction of cosine, euclidean or dot_product). /admin/ping returns a Solr-style ping response.
#Response shapes
Search responses follow Solr's JSON: responseHeader (with status, QTime and warnings when there are any), response with numFound, start and docs, and facet_counts, facets, stats and grouped blocks when you ask for them. fl aliases are applied. Date fields come back as ISO instants such as 1965-08-01T00:00:00Z.
Inspect response.numFoundExact before treating numFound as exact. Relevance searches may return an estimate; facets, grouping, field sorts, k-NN and rows=0 request exact totals.
With wt=javabin the same response is encoded as Solr encodes it for SolrJ: QueryResponse, SolrDocumentList, FacetField, RangeFacet, PivotField, FieldStatsInfo, GroupResponse and NestableJsonFacet read it as they read Solr's, and date fields are java.util.Date. JSON Request API bodies, like json.facet, must be strict JSON with quoted keys.
#Paging and suggestions
start and rows page within the plan's result window. For field-sort paging, send cursorMark=*, start=0 and an explicit sort ending in the unique key, for example sort=year_i asc,id asc. Pass the returned nextCursorMark into the next request and stop when it no longer changes. Cursor paging does not hold a snapshot; writes between requests can change the results. See Paging for restrictions.
/suggest treats each suggest.dictionary as a field name. It returns distinct matching field values, with zero weights and empty payloads; build/reload requests are no-ops. /terms supports terms.fl, terms.prefix, count limits and count/index order, but may truncate the dictionary at the plan's facet limit, with a warning. spellcheck=true on /select uses bounded word candidates; generated collations are not verified against the index. There are no configurable Solr suggester dictionaries or solrconfig.xml files.
#Not supported
Beyond the gaps listed in each section above:
- More-like-this, term vectors, clustering and query elevation. Suggest, spellcheck and terms handlers are available with bounded candidate searches and compatibility differences.
expand, joins and child-document transformers.cursorMarksupports field-sort paging without a snapshot; see Paging.- Computed fields and document transformers in
fl([docid],[explain],[child],geodist()). - Solr shape and polygon spatial queries. Use the native Geo search API for these operations.
debugoutput (accepted with a warning).
Limits and error codes are on Limits and errors. For a migration checklist, see Migration guidance.
#Hosted Solr without a cluster
A Solr collection on WarpSearch has no nodes, shards or replicas to size and no version upgrades. It bills per GB stored, per GB written and per request, and an idle collection costs only its storage. See Pricing and cost control for what a workload costs.
#Highlighting
hl=true returns Solr's document-ID-keyed highlighting block with JSON and javabin responses. The original, unified and fastVector method names select WarpSearch backends. See Highlighting for parameters and storage requirements.