Skip to main content

Crate velesdb_server

Crate velesdb_server 

Source
Expand description

VelesDB Server - REST API library for the VelesDB vector database.

This module provides the HTTP handlers and types for the VelesDB REST API.

§OpenAPI Documentation

The API is documented using OpenAPI 3.0. Access the interactive documentation at:

  • Swagger UI: GET /swagger-ui
  • OpenAPI JSON: GET /api-docs/openapi.json

Modules§

auth
API key authentication middleware.
config
Server configuration module.
explain
EXPLAIN query handler and plan building logic.
match_query
MATCH query handler for REST API (EPIC-045 US-007).
query
VelesQL query execution handlers.
search
Search handlers for vector similarity, text, and hybrid search.
tls
TLS configuration and server support via rustls.

Structs§

AggregationResponse
Response from VelesQL aggregation query execution.
ApiDoc
VelesDB API Documentation
AppState
Application state shared across handlers.
BatchSearchRequest
Request for batch vector search.
BatchSearchResponse
Response from batch search.
CollectionConfigResponse
Response with detailed collection configuration.
CollectionResponse
Response with collection information.
CollectionStatsResponse
Response with collection statistics from ANALYZE.
ColumnStatsResponse
Per-column statistics in a collection stats response.
CreateCollectionRequest
Request to create a new collection.
CreateIndexRequest
Request to create a property index.
DegreeResponse
Response for node degree query.
ErrorResponse
Error response.
ExplainCost
Estimated cost metrics for the query.
ExplainFeatures
Features detected in the query.
ExplainRequest
Request for query EXPLAIN.
ExplainResponse
Response from query EXPLAIN.
ExplainStep
A step in the query execution plan.
FusionRequest
Fusion configuration for hybrid dense+sparse search.
GuardRailsConfigRequest
Request to configure query guard-rails.
GuardRailsConfigResponse
Response with current guard-rails configuration.
HybridSearchRequest
Request for hybrid search (vector + text).
IdScoreResult
A single ID+score result from IDs-only search.
IndexResponse
Response with index information.
IndexStatsResponse
Per-index statistics in a collection stats response.
ListIndexesResponse
Response listing all indexes.
MultiQuerySearchRequest
Request for multi-query vector search with fusion.
OnboardingMetrics
Lightweight counters for first-hour troubleshooting diagnostics.
PointRequest
A point in an upsert request.
QueryErrorDetail
VelesQL query error detail.
QueryErrorResponse
VelesQL query error response.
QueryRequest
Request for VelesQL query execution.
QueryResponse
Response from VelesQL query execution.
QueryResponseMeta
Metadata section for VelesQL query responses.
SearchIdsResponse
Response from IDs-only search (no payload hydration).
SearchRequest
Request for vector search (dense, sparse, or hybrid).
SearchResponse
Response from vector search.
SearchResultResponse
A single search result.
StreamDoneEvent
SSE event: Traversal completed.
StreamInsertRequest
Request body for the streaming insert endpoint (single point).
StreamNodeEvent
SSE event: A node reached during traversal.
StreamStatsEvent
SSE event: Periodic statistics update.
StreamTraverseParams
Query parameters for streaming graph traversal.
TextSearchRequest
Request for BM25 text search.
TraversalResultItem
A single traversal result item.
TraversalStats
Statistics from traversal operation.
TraverseRequest
Request for graph traversal.
TraverseResponse
Response from graph traversal.
UnifiedQueryResponse
Unified response from /query endpoint.
UpsertPointsRequest
Request to upsert points.
VelesqlErrorDetail
Standardized VelesQL semantic/runtime error detail.
VelesqlErrorResponse
Standardized VelesQL semantic/runtime error response.

Enums§

QueryType
Query type for unified /query endpoint.
SparseVectorInput
Input format for sparse vectors, supporting two JSON representations:

Constants§

VELESQL_CONTRACT_VERSION
Canonical VelesQL contract version for REST responses.

Functions§

add_edge
Add an edge to a collection’s graph.
aggregate
Execute an aggregation-only VelesQL query.
analyze_collection
Analyze a collection, computing and persisting statistics.
batch_search
Batch search for multiple vectors.
collection_sanity
Run a quick sanity check for onboarding and troubleshooting.
create_collection
Create a new collection.
create_index
Create a property index on a graph collection.
default_avg_weight
Default average weight for weighted fusion.
default_collection_type
Default collection type: vector.
default_fusion_strategy
Default fusion strategy: RRF.
default_hit_weight
Default hit weight for weighted fusion.
default_index_type
Default index type: hash.
default_max_weight
Default max weight for weighted fusion.
default_metric
Default distance metric: cosine.
default_rrf_k
Default RRF k parameter.
default_storage_mode
Default storage mode: full (no quantization).
default_top_k
Default number of results to return.
default_vector_weight
Default vector weight for hybrid search.
delete_collection
Delete a collection.
delete_index
Delete a property index.
delete_point
Delete a point by ID.
explain
Explain a VelesQL query without executing it (EPIC-058 US-002).
flush_collection
Flush pending changes to disk.
get_collection
Get collection information.
get_collection_config
Get detailed collection configuration (HNSW params, storage mode, schema, etc.).
get_collection_stats
Get cached collection statistics (returns 404 if never analyzed).
get_edges
Get edges from a collection’s graph filtered by label.
get_guardrails
Get current guard-rails configuration.
get_node_degree
Get the degree (in and out) of a specific node.
get_point
Get a point by ID.
health_check
Liveness probe — always returns 200 OK.
hybrid_search
Hybrid search combining vector similarity and BM25 text search.
is_empty
Check if a collection is empty.
list_collections
List all collections.
list_indexes
List all indexes on a collection.
match_query
Execute a MATCH query on a collection.
mode_to_ef_search
Convert search mode string to ef_search value.
multi_query_search
Multi-query search with fusion strategies.
query
Execute a VelesQL query.
readiness_check
Readiness probe — returns 200 when the database is fully loaded, 503 otherwise.
search
Search for similar vectors.
search_ids
Lightweight search returning only IDs and scores (no payload hydration).
stream_insert
Stream-insert a single point via the bounded ingestion channel.
stream_traverse
Stream graph traversal results via SSE.
stream_upsert_points
Stream upsert points using NDJSON.
text_search
Search using BM25 full-text search.
traverse_graph
Traverse the graph using BFS or DFS from a source node.
update_guardrails
Update guard-rails configuration (partial update).
upsert_points
Upsert points to a collection.