Skip to main content

Quick Reference

A compact reference for common hlquery operations and modern routes.

Core Endpoints

MethodEndpointPurpose
GET/healthHealth check
GET/readyReadiness check
GET/statusServer status
GET/statsRuntime statistics
GET/metricsMetrics
GET/metrics/historyHistorical metrics
GET/connectionsActive connections
GET/collectionsList collections
POST/collectionsCreate collection
GET/collections/distributedList collections across links
GET/collections/{collection}Get collection
DELETE/collections/{collection}Delete collection
GET/collections/{collection}/langGet collection language
POST/collections/{collection}/updateUpdate collection schema
GET/collections/{collection}/documentsList documents
POST/collections/{collection}/documentsAdd document
DELETE/collections/{collection}/documentsDelete by filter
POST/collections/{collection}/documents/importBulk import
GET/collections/{collection}/documents/{id}Get document
PUT/collections/{collection}/documents/{id}Update document
DELETE/collections/{collection}/documents/{id}Delete document
GET/POST/collections/{collection}/documents/searchSearch
GET/POST/collections/{collection}/vector_searchVector search
GET/POST/collections/{collection}/searchVector search alias
GET/POST/multi_searchBatch search
GET/POST/searchGlobal search
GET/POST/sqlSQL-style query

Create a Collection

curl -X POST http://localhost:9200/collections \
-H "Content-Type: application/json" \
-d '{
"name": "products",
"fields": [
{"name": "title", "type": "string"},
{"name": "description", "type": "string"},
{"name": "price", "type": "float"},
{"name": "category", "type": "string"},
{"name": "embedding", "type": "float[]"}
]
}'

Add a Document

curl -X POST http://localhost:9200/collections/products/documents \
-H "Content-Type: application/json" \
-d '{
"id": "prod_001",
"title": "Laptop",
"description": "Portable workstation",
"price": 999.99,
"category": "electronics"
}'
curl "http://localhost:9200/collections/products/documents/search?q=laptop&query_by=title,description&limit=10"

Search with Filters and Sort

curl "http://localhost:9200/collections/products/documents/search?q=laptop&filter_by=price:>500&sort_by=price:asc"

Search with POST

curl -X POST http://localhost:9200/collections/products/documents/search \
-H "Content-Type: application/json" \
-d '{
"q": "laptop",
"query_by": "title,description",
"filter_by": "category:electronics",
"sort_by": "price:asc",
"limit": 10
}'

Search All Collections

# Merged GET search across every accessible collection
curl "http://localhost:9200/search?q=research&query_by=title,content&limit=20&offset=0"

# Restrict the merged search to two collections
curl "http://localhost:9200/search?q=research&collections=universities,science&limit=20"
curl -X POST http://localhost:9200/search \
-H "Content-Type: application/json" \
-d '{
"collections": ["universities", "science"],
"q": "research",
"query_by": "title,content",
"limit": 20,
"offset": 0
}'

The response is one globally sorted page. Each hit has document._collection. limit applies to the merged result, and offset + limit may not exceed 10000.

curl -X POST http://localhost:9200/collections/products/vector_search \
-H "Content-Type: application/json" \
-d '{
"vector_query": {
"field": "embedding",
"vector": [0.12, 0.44, 0.31],
"k": 10
}
}'
curl -X POST http://localhost:9200/multi_search \
-H "Content-Type: application/json" \
-d '{
"searches": [
{"collection": "products", "q": "laptop", "query_by": "title,description"},
{"collection": "articles", "q": "hardware", "query_by": "title,content"}
]
}'

SQL

curl "http://localhost:9200/sql?sql=SELECT%20*%20FROM%20products%20LIMIT%203%3B"
curl -X POST http://localhost:9200/sql \
-H "Content-Type: application/json" \
-d '{"exec":"INSERT INTO products (id, title, price) VALUES (\"prod_10\", \"Keyboard\", 49.99);"}'

Bulk Import

curl -X POST http://localhost:9200/collections/products/documents/import \
-H "Content-Type: application/json" \
-d '[
{"id":"prod_001","title":"Laptop","price":999.99},
{"id":"prod_002","title":"Mouse","price":29.99}
]'

Update or Delete by Query

curl -X POST http://localhost:9200/collections/products/documents/_update_by_query \
-H "Content-Type: application/json" \
-d '{"filter_by":"category:electronics","set":{"in_stock":true}}'
curl -X POST http://localhost:9200/collections/products/documents/_delete_by_query \
-H "Content-Type: application/json" \
-d '{"filter_by":"discontinued:true"}'

Dictionaries and Relevance

MethodEndpointPurpose
GET/synonymsList all synonyms
GET/synonyms/globalList global synonyms
POST/PUT/synonyms/global/{id}Upsert global synonym
GET/collections/{collection}/synonymsList collection synonyms
POST/PUT/collections/{collection}/synonyms/{id}Upsert collection synonym
GET/stopwordsList all stopwords
GET/stopwords/globalList global stopwords
POST/stopwords/globalCreate global stopword
GET/collections/{collection}/stopwordsList collection stopwords
POST/collections/{collection}/stopwordsCreate collection stopword
GET/collections/{collection}/overridesList overrides
POST/PUT/collections/{collection}/overrides/{id}Upsert override
GET/aliasesList aliases
GET/collections/{collection}/aliasesList aliases for a collection
POST/PUT/aliases/{alias}Upsert alias

Admin and Runtime

MethodEndpointPurpose
GET/keysList API keys
POST/keysCreate API key
GET/PUT/DELETE/keys/{id}Manage API key
GET/usersList users
POST/usersCreate user
GET/PUT/DELETE/users/{name}Manage user
POST/flushFlush all data
GET/admin/storage_statusStorage status
GET/linksCluster links
POST/links/connectAdd runtime link
POST/links/disconnectRemove runtime link
GET/modulesList modules
POST/loadmodule/{module}Load module
POST/unloadmodule/{module}Unload module

Search Parameters

ParameterDescription
qQuery text.
query_byComma-separated fields to search.
filter_byFilter expression.
sort_bySort expression such as price:asc.
facet_byComma-separated facet fields.
limitMaximum number of results.
offsetNumber of results to skip.
pagePage number where supported.
per_pagePage size where supported.
distributedSearch execution override where supported.

Query Syntax

TypeSyntaxExample
Termtermlaptop
Phrase"exact phrase""gaming laptop"
Fieldfield:valuetitle:laptop
Rangefield:[min TO max]price:[100 TO 500]
Wildcardterm*lap*
Regexfield:/pattern/title:/lap.*/
Fuzzyterm~laptop~
Boostterm^2laptop^2
Required+term+laptop
Excluded-term-apple
BooleanAND, OR, NOTlaptop AND gaming

Common Errors

StatusCause
400Invalid JSON or request parameter.
401Missing or invalid authentication.
403Token is not allowed to use the route.
404Collection, document, or resource was not found.
405Method does not match the route.
409Resource already exists or conflicts.
503Startup, metadata scan, or sync state is blocking the operation.