reindexer

Reindexer REST API

Overview

Reindexer is an embeddable, in-memory, document-oriented database with a high-level Query builder interface. Reindexer’s goal is to provide fast search with complex queries. Reindexer is compact, fast and it does not have heavy dependencies.

Version information

Version : 3.29.0

License information

License : Apache 2.0
License URL : http://www.apache.org/licenses/LICENSE-2.0.html
Terms of service : null

URI scheme

BasePath : /api/v1
Schemes : HTTP

Tags

Produces

Paths

List available databases

GET /db

Description

This operation will output list of all available databases

Parameters

Type Name Description Schema
Query sort_order
optional
Sort Order enum (asc, desc)

Responses

HTTP Code Description Schema
200 successful operation Databases
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Create new database

POST /db

Description

This operation will create new database. If database is already exists, then error will be returned.

Parameters

Type Name Description Schema
Body body
required
Database definition Database

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Drop database

DELETE /db/{database}

Description

This operation will remove complete database from memory and disk. All data, including namespaces, their documents and indexes will be erased. Can not be undone. USE WITH CAUTION.

Parameters

Type Name Description Schema
Path database
required
Database name string

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

List available namespaces

GET /db/{database}/namespaces

Description

This operation will list all available namespaces in specified database. If database is not exists, then error will be returned.

Parameters

Type Name Description Schema
Path database
required
Database name string
Query sort_order
optional
Sort Order enum (asc, desc)

Responses

HTTP Code Description Schema
200 successful operation Namespaces
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Create namespace

POST /db/{database}/namespaces

Description

This operation will create new namespace in specified database. If namespace is already exists, then operation do not nothing.

Parameters

Type Name Description Schema
Path database
required
Database name string
Body body
required
Namespace definition Namespace

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Get namespace description

GET /db/{database}/namespaces/{name}

Description

This operation will return specified namespace description, including options of namespace, and available indexes

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string

Responses

HTTP Code Description Schema
200 successful operation Namespace
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Drop namespace

DELETE /db/{database}/namespaces/{name}

Description

This operation will delete completely namespace from memory and disk. All documents, indexes and metadata from namespace will be removed. Can not be undone. USE WITH CAUTION.

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Truncate namespace

DELETE /db/{database}/namespaces/{name}/truncate

Description

This operation will delete all items from namespace.

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Rename namespace

GET /db/{database}/namespaces/{name}/rename/{newname}

Description

This operation will rename namespace.

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string
Path newname
required
Namespace new name string

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Get list of namespace’s meta info

GET /db/{database}/namespaces/{name}/metalist

Description

This operation will return list of keys of all meta of specified namespace

Parameters

Type Name Description Schema Default
Path database
required
Database name string  
Path name
required
Namespace name string  
Query limit
optional
If 0 - no limit integer 0
Query offset
optional
  integer 0
Query sort_order
optional
Sort Order enum (asc, desc)  
Query with_values
optional
Include values in response boolean "false"

Responses

HTTP Code Description Schema
200 successful operation MetaListResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Get namespace’s meta info by key

GET /db/{database}/namespaces/{name}/metabykey/{key}

Description

This operation will return value of namespace’s meta with specified key

Parameters

Type Name Description Schema
Path database
required
Database name string
Path key
required
Meta key string
Path name
required
Namespace name string

Responses

HTTP Code Description Schema
200 Successful operation MetaByKeyResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Remove namespace’s meta info for key

DELETE /db/{database}/namespaces/{name}/metabykey/{key}

Description

This operation will remove meta with specified key from namespace

Parameters

Type Name Description Schema
Path database
required
Database name string
Path key
required
Meta key string
Path name
required
Namespace name string

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Put namespace’s meta info with specified key and value

PUT /db/{database}/namespaces/{name}/metabykey

Description

This operation will set namespace’s meta with specified key and value

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string
Body meta_info
required
Meta info MetaInfo

Responses

HTTP Code Description Schema
200 successful operation UpdateResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Get documents from namespace

GET /db/{database}/namespaces/{name}/items

Description

This operation will select documents from namespace with specified filters, and sort them by specified sort order. Paging with limit and offset are supported.

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string
Query fields
optional
Comma-separated list of returned fields string
Query filter
optional
Filter with SQL syntax, e.g: field1 = ‘v1’ AND field2 > ‘v2’ string
Query format
optional
encoding data format enum (json, msgpack, protobuf, csv-file)
Query limit
optional
Maximum count of returned items integer
Query offset
optional
Offset of first returned item integer
Query sort_field
optional
Sort Field string
Query sort_order
optional
Sort Order enum (asc, desc)

Responses

HTTP Code Description Schema
200 successful operation Items
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Update documents in namespace

PUT /db/{database}/namespaces/{name}/items

Description

This operation will UPDATE documents in namespace, by their primary keys. Each document should be in request body as separate JSON object, e.g.

{"id":100, "name": "Pet"}
{"id":101, "name": "Dog"}
...

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string
Query format
optional
encoding data format enum (json, msgpack, protobuf)
Query precepts
optional
Precepts to be done < string > array(multi)
Body body
required
  object

Responses

HTTP Code Description Schema
200 successful operation ItemsUpdateResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Insert documents to namespace

POST /db/{database}/namespaces/{name}/items

Description

This operation will INSERT documents to namespace, by their primary keys. Each document should be in request body as separate JSON object, e.g.

{"id":100, "name": "Pet"}
{"id":101, "name": "Dog"}
...

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string
Query format
optional
encoding data format enum (json, msgpack, protobuf)
Query precepts
optional
Precepts to be done < string > array(multi)
Body body
required
  object

Responses

HTTP Code Description Schema
200 successful operation ItemsUpdateResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Delete documents from namespace

DELETE /db/{database}/namespaces/{name}/items

Description

This operation will DELETE documents from namespace, by their primary keys. Each document should be in request body as separate JSON object, e.g.

{"id":100}
{"id":101}
...

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string
Query precepts
optional
Precepts to be done < string > array(multi)
Body body
required
  object

Responses

HTTP Code Description Schema
200 successful operation ItemsUpdateResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Upsert documents in namespace

PATCH /db/{database}/namespaces/{name}/items

Description

This operation will UPSERT documents in namespace, by their primary keys. Each document should be in request body as separate JSON object, e.g.

{"id":100, "name": "Pet"}
{"id":101, "name": "Dog"}
...

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string
Query format
optional
encoding data format enum (json, msgpack, protobuf)
Query precepts
optional
Precepts to be done < string > array(multi)
Body body
required
  object

Responses

HTTP Code Description Schema
200 successful operation ItemsUpdateResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

List available indexes

GET /db/{database}/namespaces/{name}/indexes

Description

This operation will return list of available indexes, from specified database and namespace.

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string

Responses

HTTP Code Description Schema
200 successful operation Indexes
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Update index in namespace

PUT /db/{database}/namespaces/{name}/indexes

Description

This operation will update index parameters. E.g. type of field or type of index. Operation synchronous, so it can take long time, if namespace contains bunch of documents

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string
Body body
required
Index definition Index

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Add new index to namespace

POST /db/{database}/namespaces/{name}/indexes

Description

This operation will create new index. If index is already exists with the different parameters, then error will be returned. Operation synchronous, so it can take long time, if namespace contains bunch of documents.

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string
Body body
required
Index definition Index

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Drop index from namespace

DELETE /db/{database}/namespaces/{name}/indexes/{indexname}

Description

This operation will remove index from namespace. No data will be erased. Operation synchronous, so it can take long time, if namespace contains bunch of documents.

Parameters

Type Name Description Schema
Path database
required
Database name string
Path indexname
required
Index name string
Path name
required
Namespace name string

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Get namespace schema

GET /db/{database}/namespaces/{name}/schema

Description

This operation will return current schema from specified database and namespace

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string

Responses

HTTP Code Description Schema
200 successful operation SchemaDef
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Set namespace schema

PUT /db/{database}/namespaces/{name}/schema

Description

This operation will set namespace schema (information about available fields and field types)

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string
Body body
required
This operation will put new schema for specified database and namespace SchemaDef

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Get protobuf communication parameters schema

GET /db/{database}/protobuf_schema

Description

This operation allows to get client/server communication parameters as google protobuf schema (content of .proto file)

Parameters

Type Name Description Schema
Path database
required
Database name string
Query ns
required
Namespace name < string > array(multi)

Responses

HTTP Code Description Schema
200 successful operation No Content
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Produces

Tags

Query documents from namespace

GET /db/{database}/query

Description

This operation queries documents from namespace by SQL query. Query can be preceded by EXPLAIN statement, then query execution plan will be returned with query results. Two level paging is supported. At first, applied normal SQL LIMIT and OFFSET, then limit and offset from http request.

Parameters

Type Name Description Schema
Path database
required
Database name string
Query format
optional
encoding data format enum (json, msgpack, protobuf, csv-file)
Query limit
optional
Maximum count of returned items integer
Query offset
optional
Offset of first returned item integer
Query q
required
SQL query string
Query width
optional
Total width in rows of view for table format output integer
Query with_columns
optional
Return columns names and widths for table format output boolean

Responses

HTTP Code Description Schema
200 successful operation QueryItems
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Update documents in namespace

PUT /db/{database}/query

Description

This operation updates documents in namespace by DSL query.

Parameters

Type Name Description Schema
Path database
required
Database name string
Body body
required
DSL query Query

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Query documents from namespace

POST /db/{database}/query

Description

This operation queries documents from namespace by DSL query.

Parameters

Type Name Description Schema
Path database
required
Database name string
Query format
optional
encoding data format enum (json, msgpack, protobuf, csv-file)
Query width
optional
Total width in rows of view for table format output integer
Query with_columns
optional
Return columns names and widths for table format output boolean
Body body
required
DSL query Query

Responses

HTTP Code Description Schema
200 successful operation QueryItems
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Delete documents from namespace

DELETE /db/{database}/query

Description

This operation removes documents from namespace by DSL query.

Parameters

Type Name Description Schema
Path database
required
Database name string
Body body
required
DSL query Query

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Begin transaction to namespace

POST /db/{database}/namespaces/{name}/transactions/begin

Parameters

Type Name Description Schema
Path database
required
Database name string
Path name
required
Namespace name string
Query format
optional
encoding data format enum (json, msgpack, protobuf)

Responses

HTTP Code Description Schema
200 successful operation BeginTransactionResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Commit transaction

POST /db/{database}/transactions/{tx_id}/commit

Parameters

Type Name Description Schema
Path database
required
Database name string
Path tx_id
required
transaction id string

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Rollback transaction

POST /db/{database}/transactions/{tx_id}/rollback

Parameters

Type Name Description Schema
Path database
required
Database name string
Path tx_id
required
transaction id string

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Update documents in namespace via transaction

PUT /db/{database}/transactions/{tx_id}/items

Description

This will add UPDATE operation into transaction. It UPDATEs documents in namespace, by their primary keys. Each document should be in request body as separate JSON object, e.g.

{"id":100, "name": "Pet"}
{"id":101, "name": "Dog"}
...

Parameters

Type Name Description Schema
Path database
required
Database name string
Path tx_id
required
transaction id string
Query format
optional
encoding data format enum (json, msgpack, protobuf)
Query precepts
optional
Precepts to be done < string > array(multi)
Body body
required
  object

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Insert documents to namespace via transaction

POST /db/{database}/transactions/{tx_id}/items

Description

This will add INSERT operation into transaction. It INSERTs documents to namespace, by their primary keys. Each document should be in request body as separate JSON object, e.g.

{"id":100, "name": "Pet"}
{"id":101, "name": "Dog"}
...

Parameters

Type Name Description Schema
Path database
required
Database name string
Path tx_id
required
transaction id string
Query format
optional
encoding data format enum (json, msgpack, protobuf)
Query precepts
optional
Precepts to be done < string > array(multi)
Body body
required
  object

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Delete documents from namespace via transaction

DELETE /db/{database}/transactions/{tx_id}/items

Description

This will add DELETE operation into transaction. It DELETEs documents from namespace, by their primary keys. Each document should be in request body as separate JSON object, e.g.

{"id":100}
{"id":101}
...

Parameters

Type Name Description Schema
Path database
required
Database name string
Path tx_id
required
transaction id string
Query precepts
optional
Precepts to be done < string > array(multi)
Body body
required
  object

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Upsert documents in namespace via transaction

PATCH /db/{database}/transactions/{tx_id}/items

Description

This will add UPSERT operation into transaction. It UPDATEs documents in namespace, by their primary keys. Each document should be in request body as separate JSON object, e.g.

{"id":100, "name": "Pet"}
{"id":101, "name": "Dog"}
...

Parameters

Type Name Description Schema
Path database
required
Database name string
Path tx_id
required
transaction id string
Query format
optional
encoding data format enum (json, msgpack, protobuf)
Query precepts
optional
Precepts to be done < string > array(multi)
Body body
required
  object

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Delete/update queries for transactions

GET /db/{database}/transactions/{tx_id}/query

Description

This will add DELETE/UPDATE SQL query into transaction. This query UPDATEs/DELETEs documents from namespace

Parameters

Type Name Description Schema
Path database
required
Database name string
Path tx_id
required
transaction id string
Query format
optional
encoding data format enum (json, msgpack, protobuf)
Query q
required
SQL query string
Query width
optional
Total width in rows of view for table format output integer

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Delete documents from namespace (transactions)

DELETE /db/{database}/transactions/{tx_id}/query

Description

This will add DELETE query into transaction. DELETE query removes documents from namespace by DSL query.

Parameters

Type Name Description Schema
Path database
required
Database name string
Path tx_id
required
transaction id string
Query tx_id
optional
transaction id string
Body body
required
DSL query Query

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Suggest for autocompletion of SQL query

GET /db/{database}/suggest

Description

This operation pareses SQL query, and suggests autocompletion variants

Parameters

Type Name Description Schema
Path database
required
Database name string
Query line
required
Cursor line for suggest integer
Query pos
required
Cursor position for suggest integer
Query q
required
SQL query string

Responses

HTTP Code Description Schema
200 successful operation SuggestItems
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Query documents from namespace

POST /db/{database}/sqlquery

Description

This operation queries documents from namespace by SQL query. Query can be preceded by EXPLAIN statement, then query execution plan will be returned with query results.

Parameters

Type Name Description Schema
Path database
required
Database name string
Query format
optional
encoding data format enum (json, msgpack, protobuf, csv-file)
Query width
optional
Total width in rows of view for table format output integer
Query with_columns
optional
Return columns names and widths for table format output boolean
Body q
required
SQL query string

Responses

HTTP Code Description Schema
200 successful operation QueryItems
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Get system information

GET /check

Description

This operation will return system information about server version, uptime, and resources consumption

Responses

HTTP Code Description Schema
200 successful operation SysInfo
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Try to release free memory back to the operating system for reuse by other applications.

POST /allocator/drop_cache

Description

Try to release free memory back to the operating system for reuse. Only for tcmalloc allocator.

Responses

HTTP Code Description Schema
200 Successful operation StatusResponse
403 Forbidden StatusResponse

Tags

Get memory usage information

GET /allocator/info

Description

This operation will return memory usage information from tcmalloc allocator.

Responses

HTTP Code Description Schema
200 successful operation No Content
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Get activity stats information

GET /db/{database}/namespaces/%23activitystats/items

Description

This operation will return detailed information about current activity of all connected to the database clients

Parameters

Type Name Description Schema
Path database
required
Database name string

Responses

HTTP Code Description Schema
200 successful operation ActivityStats
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Get client connection information

GET /db/{database}/namespaces/%23clientsstats/items

Description

This operation will return detailed information about all connections on the server

Parameters

Type Name Description Schema
Path database
required
Database name string

Responses

HTTP Code Description Schema
200 successful operation ClientsStats
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Get memory stats information

GET /db/{database}/namespaces/%23memstats/items

Description

This operation will return detailed information about database memory consumption

Parameters

Type Name Description Schema
Path database
required
Database name string

Responses

HTTP Code Description Schema
200 successful operation DatabaseMemStats
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Get performance stats information

GET /db/{database}/namespaces/%23perfstats/items

Description

This operation will return detailed information about database performance timings. By default performance stats is turned off.

Parameters

Type Name Description Schema
Path database
required
Database name string

Responses

HTTP Code Description Schema
200 successful operation DatabasePerfStats
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Get SELECT queries performance stats information

GET /db/{database}/namespaces/%23queriesperfstats/items

Description

This operation will return detailed information about database memory consumption. By default quires performance stat is turned off.

Parameters

Type Name Description Schema
Path database
required
Database name string

Responses

HTTP Code Description Schema
200 successful operation QueriesPerfStats
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Update system config

PUT /db/{database}/namespaces/%23config/items

Description

This operation will update system configuration:

Parameters

Type Name Description Schema
Path database
required
Database name string
Body body
required
  SystemConfigItem

Responses

HTTP Code Description Schema
200 successful operation UpdateResponse
400 Invalid arguments supplied StatusResponse
403 Forbidden StatusResponse
404 Entry not found StatusResponse
408 Context timeout StatusResponse
500 Unexpected internal error StatusResponse

Tags

Definitions

ActionCommand

Name Description Schema
command
optional
Command to execute enum (restart_replication)

ActivityStats

Name Description Schema
items
optional
  < items > array
total_items
optional
Total count of documents, matched specified filters integer

items

Name Description Schema
client
required
Client identifier string
lock_description
optional
  string
query
required
Query text string
query_id
required
Query identifier integer
query_start
required
Query start time string
state
required
Current operation state enum (in_progress, wait_lock, sending, indexes_lookup, bool, select_loop)
user
optional
User name string

AggregationResDef

Name Description Schema
distincts
optional
List of distinct values of the field < string > array
facets
optional
Facets, calculated by aggregator < facets > array
fields
required
Fields or indexes names for aggregation function < string > array
type
required
Aggregation function enum (SUM, AVG, MIN, MAX, FACET, DISTINCT)
value
optional
Value, calculated by aggregator number

facets

Name Description Schema
count
required
Count of elements these fields values integer
values
required
Facet fields values < string > array

AggregationsDef

Name Description Schema
fields
required
Fields or indexes names for aggregation function < string > array
limit
optional
Number of rows to get from result set. Allowed only for FACET
Minimum value : 0
integer
offset
optional
Index of the first row to get from result set. Allowed only for FACET
Minimum value : 0
integer
sort
optional
Specifies results sorting order. Allowed only for FACET < AggregationsSortDef > array
type
required
Aggregation function enum (SUM, AVG, MIN, MAX, FACET, DISTINCT)

AggregationsSortDef

Specifies facet aggregations results sorting order

Name Description Schema
desc
optional
Descent or ascent sorting direction boolean
field
required
Field or index name for sorting string

BeginTransactionResponse

Name Description Schema
tx_id
optional
Unique transaction id string

CacheMemStats

Name Description Schema
empty_count
optional
Count of empty elements slots in this cache integer
hit_count_limit
optional
Number of hits of queries, to store results in cache integer
items_count
optional
Count of used elements stored in this cache integer
total_size
optional
Total memory consumption by this cache integer

ClientsStats

Name Description Schema
items
optional
  < items > array
total_items
optional
Count of connected clients integer

items

Name Description Schema
app_name
required
Client’s application name string
client_version
required
Client version string string
connection_id
required
Connection identifier integer
current_activity
required
Current activity string
db_name
required
Database name string
ip
required
Ip string
is_subscribed
required
Status of updates subscription boolean
last_recv_ts
optional
Timestamp of last recv operation (ms) integer
last_send_ts
optional
Timestamp of last send operation (ms) integer
pended_updates
optional
Pended updates count integer
recv_bytes
required
Receive byte integer
recv_rate
optional
Current recv rate (bytes/s) integer
send_buf_bytes
optional
Send buffer size integer
send_rate
optional
Current send rate (bytes/s) integer
sent_bytes
required
Send byte integer
start_time
required
Server start time in unix timestamp integer
tx_count
required
Count of currently opened transactions for this client integer
updates_filter
required
Updates filter for this client updates_filter
updates_lost
optional
Updates lost call count integer
user_name
required
User name string
user_rights
required
User right string

updates_filter

Name Schema
namespaces
optional
< namespaces > array

namespaces

Name Description Schema
filters
optional
Filtering conditions set < object > array
name
optional
Namespace name string

CommonPerfStats

Name Description Schema
last_sec_avg_latency_us
optional
Average latency (execution time) for queries to this object at last second integer
last_sec_avg_lock_time_us
optional
Average waiting time for acquiring lock to this object at last second integer
last_sec_qps
optional
Count of queries to this object, requested at last second integer
latency_stddev
optional
Standard deviation of latency values number
max_latency_us
optional
Maximum latency value integer
min_latency_us
optional
Minimal latency value integer
total_avg_latency_us
optional
Average latency (execution time) for queries to this object integer
total_avg_lock_time_us
optional
Average waiting time for acquiring lock to this object integer
total_queries_count
optional
Total count of queries to this object integer

Database

Name Description Schema
name
optional
Name of database
Pattern : "^[A-Za-z0-9_\\-]*$"
string

DatabaseMemStats

Name Description Schema
items
optional
Documents, matched specified filters < NamespaceMemStats > array
total_items
optional
Total count of documents, matched specified filters integer

DatabasePerfStats

Name Description Schema
items
optional
Documents, matched specified filters < NamespacePerfStats > array
total_items
optional
Total count of documents, matched specified filters integer

Databases

Name Description Schema
items
optional
  < string > array
total_items
optional
Total count of databases integer

EqualPositionDef

Array fields to be searched with equal array indexes

Name Schema
positions
optional
< string > array

ExplainDef

Query execution explainings

Name Description Schema
general_sort_us
optional
Result sort time integer
indexes_us
optional
Indexes keys selection time integer
loop_us
optional
Intersection loop time integer
on_conditions_injections
optional
Describes Join ON conditions injections < on_conditions_injections > array
postprocess_us
optional
Query post process time integer
prepare_us
optional
Query prepare and optimize time integer
preselect_us
optional
Query preselect processing time integer
selectors
optional
Filter selectors, used to process query conditions < selectors > array
sort_by_uncommitted_index
optional
Optimization of sort by uncompleted index has been performed boolean
sort_index
optional
Index, which used for sort results string
subqueries
optional
Explain of subqueries preselect < subqueries > array
total_us
optional
Total query execution time integer

on_conditions_injections

Name Description Schema
conditions
optional
Individual conditions processing results < conditions > array
injected_condition
optional
Injected condition. SQL-like string string
namespace
optional
Joinable ns name string
on_condition
optional
Original ON-conditions clause. SQL-like string string
reason
optional
Optional{succeed==false}. Explains condition injection failure string
success
optional
Result of injection attempt boolean
total_time_us
optional
Total amount of time spent on checking and substituting all conditions integer
type
optional
Values source: preselect values(by_value) or additional select(select) string

conditions

Name Description Schema
agg_type
optional
Optional. Aggregation type used in subquery enum (min, max, distinct)
condition
optional
single condition from Join ON section. SQL-like string string
explain_select
optional
Optional. Explain of Select subquery ExplainDef
new_condition
optional
substituted injected condition. SQL-like string string
reason
optional
Optional. Explains condition injection failure string
success
optional
result of injection attempt boolean
total_time_us
optional
total time elapsed from injection attempt start till the end of substitution or rejection integer
values_count
optional
resulting size of query values set integer

selectors

Name Description Schema
comparators
optional
Count of comparators used, for this selector integer
condition
optional
Condition on the field string
cost
optional
Cost expectation of this selector integer
description
optional
Description of the selector string
explain_preselect
optional
Preselect in joined namespace execution explainings ExplainDef
explain_select
optional
One of selects in joined namespace execution explainings ExplainDef
field
optional
Field or index name string
field_type
optional
Shows which kind of the field was used for the filtration. Non-indexed fields are usually really slow for ‘scan’ and should be avoided enum (non-indexed, indexed)
items
optional
Count of scanned documents by this selector integer
keys
optional
Number of uniq keys, processed by this selector (may be incorrect, in case of internal query optimization/caching integer
matched
optional
Count of processed documents, matched this selector integer
method
optional
Method, used to process condition enum (scan, index, inner_join, left_join)
type
optional
Select iterator type enum (Comparator, TwoFieldsComparison, Skipped, Forward, Reverse, SingleRange, SingleIdset, SingleIdSetWithDeferedSort, RevSingleRange, RevSingleIdset, RevSingleIdSetWithDeferedSort, OnlyComparator, Unsorted, UnbuiltSortOrdersIndex)

subqueries

Name Description Schema
explain
optional
Explain of the subquery’s preselect ExplainDef
field
optional
Name of field being compared with the subquery’s result string
keys
optional
Count of keys being compared with the subquery’s result integer
namespace
optional
Subquery’s namespace name string

FilterDef

If contains ‘filters’ then cannot contain ‘cond’, ‘field’ and ‘value’. If not contains ‘filters’ then ‘field’ and ‘cond’ are required.

Name Description Schema
always
optional
Boolean constant boolean
cond
optional
Condition operator enum (EQ, GT, GE, LE, LT, SET, ALLSET, EMPTY, RANGE, LIKE, DWITHIN)
equal_positions
optional
Array of array fields to be searched with equal array indexes < EqualPositionDef > array
field
optional
Field json path or index name for filter string
filters
optional
Filter for results documents < FilterDef > array
first_field
optional
First field json path or index name for filter by two fields string
join_query
optional
  JoinedDef
op
optional
Logic operator enum (AND, OR, NOT)
second_field
optional
Second field json path or index name for filter by two fields string
subquery
optional
Subquery to compare its result SubQuery
value
optional
Value of filter. Single integer or string for EQ, GT, GE, LE, LT condition, array of 2 elements for RANGE condition, variable len array for SET and ALLSET conditions, or something like that: ‘[[1, -3.5],5.0]’ for DWITHIN object

FtStopWordObject

Name Description Schema
is_morpheme
optional
If the value is true, the word can be included in search results in queries such as ‘word*’, ‘word~’ etc.
Default : false
boolean
word
optional
Stop word string

FulltextConfig

Fulltext Index configuration

Name Description Schema
base_ranking
optional
Config for subterm proc rank. base_ranking
bm25_boost
optional
Boost of bm25 ranking
Default : 1.0
Minimum value : 0
Maximum value : 10
number (float)
bm25_config
optional
Config for document ranking function bm25_config
bm25_weight
optional
Weight of bm25 rank in final rank 0: bm25 will not change final rank. 1: bm25 will affect to final rank in 0 - 100% range
Default : 0.1
Minimum value : 0
Maximum value : 1
number (float)
distance_boost
optional
Boost of search query term distance in found document
Default : 1.0
Minimum value : 0
Maximum value : 10
number (float)
distance_weight
optional
Weight of search query terms distance in found document in final rank 0: distance will not change final rank. 1: distance will affect to final rank in 0 - 100% range
Default : 0.5
Minimum value : 0
Maximum value : 1
number (float)
enable_kb_layout
optional
Enable wrong keyboard layout variants processing. e.g. term ‘keynbr’ will match word ‘лунтик’
Default : true
boolean
enable_numbers_search
optional
Enable number variants processing. e.g. term ‘100’ will match words one hundred
Default : false
boolean
enable_preselect_before_ft
optional
Enable to execute others queries before the ft query
Default : false
boolean
enable_translit
optional
Enable russian translit variants processing. e.g. term ‘luntik’ will match word ‘лунтик’
Default : true
boolean
extra_word_symbols
optional
List of symbols, which will be treated as word part, all other symbols will be treated as word separators
Default : "-/+"
string
fields
optional
Configuration for certain field if it differ from whole index configuration < FulltextFieldConfig > array
full_match_boost
optional
Boost of full match of search phrase with doc
Default : 1.1
Minimum value : 0
Maximum value : 10
number (float)
log_level
optional
Log level of full text search engine
Minimum value : 0
Maximum value : 4
integer
max_areas_in_doc
optional
Max number of highlighted areas for each field in each document (for snippet() and highlight()). ‘-1’ means unlimited
Maximum value : 1000000000
number
max_rebuild_steps
optional
Maximum steps without full rebuild of ft - more steps faster commit slower select - optimal about 15.
Minimum value : 0
Maximum value : 500
integer
max_step_size
optional
Maximum unique words to step
Minimum value : 5
Maximum value : 1000000000
integer
max_total_areas_to_cache
optional
Max total number of highlighted areas in ft result, when result still remains cacheable. ‘-1’ means unlimited
Maximum value : 1000000000
number
max_typo_len
optional
Maximum word length for building and matching variants with typos.
Minimum value : 0
Maximum value : 100
integer
max_typos
optional
Maximum possible typos in word. 0: typos is disabled, words with typos will not match. N: words with N possible typos will match. It is not recommended to set more than 2 possible typo -It will seriously increase RAM usage, and decrease search speed
Minimum value : 0
Maximum value : 4
integer
merge_limit
optional
Maximum documents count which will be processed in merge query results. Increasing this value may refine ranking of queries with high frequency words, but will decrease search speed
Minimum value : 1
Maximum value : 33554431
integer
min_relevancy
optional
Minimum rank of found documents. 0: all found documents will be returned 1: only documents with relevancy >= 100% will be returned
Default : 0.05
Minimum value : 0
Maximum value : 1
number (float)
optimization
optional
Optimize the index by memory or by cpu
Default : "Memory"
enum (Memory, CPU)
partial_match_decrease
optional
Decrease of relevancy in case of partial match by value: partial_match_decrease * (non matched symbols) / (matched symbols)
Minimum value : 0
Maximum value : 100
integer
position_boost
optional
Boost of search query term position
Default : 1.0
Minimum value : 0
Maximum value : 10
number (float)
position_weight
optional
Weight of search query term position in final rank. 0: term position will not change final rank. 1: term position will affect to final rank in 0 - 100% range
Default : 0.1
Minimum value : 0
Maximum value : 1
number (float)
stemmers
optional
List of stemmers to use < string > array
stop_words
optional
List of objects of stop words. Words from this list will be ignored when building indexes < FtStopWordObject > array
sum_ranks_by_fields_ratio
optional
Ratio to summation of ranks of match one term in several fields. For example, if value of this ratio is K, request is ‘@+f1,+f2,+f3 word’, ranks of match in fields are R1, R2, R3 and R2 < R1 < R3, final rank will be R = R2 + KR1 + KK*R3
Default : 0.0
Minimum value : 0
Maximum value : 1
number (float)
synonyms
optional
List of synonyms for replacement < FulltextSynonym > array
term_len_boost
optional
Boost of search query term length
Default : 1.0
Minimum value : 0
Maximum value : 10
number (float)
term_len_weight
optional
Weight of search query term length in final rank. 0: term length will not change final rank. 1: term length will affect to final rank in 0 - 100% range
Default : 0.3
Minimum value : 0
Maximum value : 1
number (float)
typos_detailed_config
optional
Config for more precise typos algorithm tuning typos_detailed_config

base_ranking

Name Description Schema
base_typo_proc
optional
Base relevancy of typo match
Minimum value : 0
Maximum value : 500
integer
full_match_proc
optional
Relevancy of full word match
Minimum value : 0
Maximum value : 500
integer
kblayout_proc
optional
Relevancy of the match in incorrect kblayout
Minimum value : 0
Maximum value : 500
integer
prefix_min_proc
optional
Minimum relevancy of prefix word match
Minimum value : 0
Maximum value : 500
integer
stemmer_proc_penalty
optional
Penalty for the variants, created by stemming
Minimum value : 0
Maximum value : 500
integer
suffix_min_proc
optional
Minimum relevancy of suffix word match
Minimum value : 0
Maximum value : 500
integer
synonyms_proc
optional
Relevancy of the synonym match
Minimum value : 0
Maximum value : 500
integer
translit_proc
optional
Relevancy of the match in translit
Minimum value : 0
Maximum value : 500
integer
typo_proc_penalty
optional
Extra penalty for each word’s permutation (addition/deletion of the symbol) in typo algorithm
Minimum value : 0
Maximum value : 500
integer

bm25_config

Name Description Schema
bm25_b
optional
Coefficient b in the formula for calculating bm25. If b is bigger, the effects of the length of the document compared to the average length are more amplified.
Default : 0.75
Minimum value : 0
Maximum value : 1
number (float)
bm25_k1
optional
Coefficient k1 in the formula for calculating bm25. Coefficient that sets the saturation threshold for the frequency of the term. The higher the coefficient, the higher the threshold and the lower the saturation rate.
Default : 2.0
Minimum value : 0
number (float)
bm25_type
optional
Formula for calculating document relevance (rx_bm25, bm25, word_count)
Default : "rx_bm25"
enum (rx_bm25, bm25, word_count)

typos_detailed_config

Name Description Schema
max_extra_letters
optional
Maximum number of symbols, which may be added to the initial term to transform it into the result word
Minimum value : -1
Maximum value : 2
integer
max_missing_letters
optional
Maximum number of symbols, which may be removed from the initial term to transform it into the result word
Minimum value : -1
Maximum value : 2
integer
max_symbol_permutation_distance
optional
Maximum distance between same symbols in initial and target words to perform substitution (to handle cases, when two symbols were switched with each other)
Minimum value : -1
Maximum value : 100
integer
max_typo_distance
optional
Maximum distance between symbols in initial and target words to perform substitution
Minimum value : -1
Maximum value : 100
integer

FulltextFieldConfig

Configuration for certain field if it differ from whole index configuration

Name Description Schema
bm25_boost
optional
Boost of bm25 ranking
Default : 1.0
Minimum value : 0
Maximum value : 10
number (float)
bm25_weight
optional
Weight of bm25 rank in final rank 0: bm25 will not change final rank. 1: bm25 will affect to final rank in 0 - 100% range
Default : 0.1
Minimum value : 0
Maximum value : 1
number (float)
field_name
optional
Field name string
position_boost
optional
Boost of search query term position
Default : 1.0
Minimum value : 0
Maximum value : 10
number (float)
position_weight
optional
Weight of search query term position in final rank. 0: term position will not change final rank. 1: term position will affect to final rank in 0 - 100% range
Default : 0.1
Minimum value : 0
Maximum value : 1
number (float)
term_len_boost
optional
Boost of search query term length
Default : 1.0
Minimum value : 0
Maximum value : 10
number (float)
term_len_weight
optional
Weight of search query term length in final rank. 0: term length will not change final rank. 1: term length will affect to final rank in 0 - 100% range
Default : 0.3
Minimum value : 0
Maximum value : 1
number (float)

FulltextSynonym

Fulltext synonym definition

Name Description Schema
alternatives
optional
List of alternatives, which will be used for search documents < string > array
tokens
optional
List source tokens in query, which will be replaced with alternatives < string > array

Index

Name Description Schema
collate_mode
optional
String collate mode
Default : "none"
enum (none, ascii, utf8, numeric)
config
optional
  FulltextConfig
expire_after
optional
Specify, time to live for ttl index, in seconds integer
field_type
required
Field data type enum (int, int64, double, string, bool, composite, point)
index_type
required
Index structure type
Default : "hash"
enum (hash, tree, text, rtree, ttl, -)
is_array
optional
Specifies, that index is array. Array indexes can work with array fields, or work with multiple fields
Default : false
boolean
is_dense
optional
Reduces the index size. For hash and tree it will save ~8 bytes per unique key value. Useful for indexes with high selectivity, but for tree and hash indexes with low selectivity can seriously decrease update performance;
Default : false
boolean
is_pk
optional
Specifies, that index is primary key. The update operations will checks, that PK field is unique. The namespace MUST have only 1 PK index boolean
is_simple_tag
optional
Use simple tag instead of actual index, which will notice rx about possible field name for strict policies
Default : false
boolean
is_sparse
optional
Value of index may not present in the document, and therefore, reduce data size but decreases speed operations on index
Default : false
boolean
json_paths
required
Fields path in json object, e.g ‘id’ or ‘subobject.field’. If index is ‘composite’ or ‘is_array’, than multiple json_paths can be specified, and index will get values from all specified fields. < string > array
name
required
Name of index, can contains letters, digits and underscores
Default : "id"
Pattern : "^[A-Za-z0-9_\\-]*$"
string
rtree_type
optional
Algorithm to construct RTree index
Default : "rstar"
enum (linear, quadratic, greene, rstar)
sort_order_letters
optional
Sort order letters
Default : ""
string

IndexCacheMemStats

Idset cache stats. Stores merged reverse index results of SELECT field IN(…) by IN(…) keys

Polymorphism : Composition

Name Description Schema
empty_count
optional
Count of empty elements slots in this cache integer
hit_count_limit
optional
Number of hits of queries, to store results in cache integer
items_count
optional
Count of used elements stored in this cache integer
total_size
optional
Total memory consumption by this cache integer

IndexMemStat

Name Description Schema
data_size
optional
Total memory consumption of documents’s data, held by index integer
fulltext_size
optional
Total memory consumption of fulltext search structures integer
idset_btree_size
optional
Total memory consumption of reverse index b-tree structures. For dense and store indexes always 0 integer
idset_cache
optional
  IndexCacheMemStats
idset_plain_size
optional
Total memory consumption of reverse index vectors. For store indexes always 0 integer
name
optional
Name of index. There are special index with name -tuple. It’s stores original document’s json structure with non indexed fields string
sort_orders_size
optional
Total memory consumption of SORT statement and GT, LT conditions optimized structures. Applicable only to tree indexes integer
tracked_updates_buckets
optional
Buckets count in index updates tracker map integer
tracked_updates_count
optional
Updates count, pending in index updates tracker integer
tracked_updates_overflow
optional
Updates tracker map overflow (number of elements, stored outside of the main buckets) integer
tracked_updates_size
optional
Updates tracker map size in bytes integer
unique_keys_count
optional
Count of unique keys values stored in index integer

Indexes

Name Description Schema
items
optional
  < Index > array
total_items
optional
Total count of indexes integer

Items

Name Description Schema
items
optional
Documents, matched specified filters < object > array
total_items
optional
Total count of documents, matched specified filters integer

ItemsUpdateResponse

Name Description Schema
items
optional
Updated documents. Contains only if precepts were provided < object > array
updated
optional
Count of updated items integer

JoinCacheMemStats

Join cache stats. Stores results of selects to right table by ON condition

Polymorphism : Composition

Name Description Schema
empty_count
optional
Count of empty elements slots in this cache integer
hit_count_limit
optional
Number of hits of queries, to store results in cache integer
items_count
optional
Count of used elements stored in this cache integer
total_size
optional
Total memory consumption by this cache integer

JoinedDef

Name Description Schema
filters
optional
Filter for results documents < FilterDef > array
limit
optional
Maximum count of returned items integer
namespace
required
Namespace name string
offset
optional
Offset of first returned item integer
select_filter
optional
Filter fields of returned document. Can be dot separated, e.g ‘subobject.field’ < string > array
sort
optional
  < SortDef > array
on
optional
Join ON statement < OnDef > array
type
required
Join type enum (LEFT, INNER, ORINNER)

JsonObjectDef

Name Description Schema
additionalProperties
optional
Allow additional fields in this schema level. Allowed for objects only
Default : false
boolean
items
optional
  JsonObjectDef
properties
optional
  properties
required
optional
Array of required fieldsl. Allowed for objects only < string > array
type
optional
Entity type enum (object, string, number, array)

properties

Name Schema
field1
optional
JsonObjectDef
field2
optional
JsonObjectDef

LongQueriesLogging

Parameters for logging long queries and transactions

Name Schema
select
optional
SelectLogging
transaction
optional
TransactionLogging
update_delete
optional
UpdateDeleteLogging

MetaByKeyResponse

Meta info of the specified namespace

Name Schema
key
required
string
value
required
string

MetaInfo

Meta info to be set

Name Schema
key
required
string
value
required
string

MetaListResponse

List of meta info of the specified namespace

Name Description Schema
meta
required
  < meta > array
total_items
required
Total count of meta info in the namespace integer

meta

Name Description Schema
key
required
  string
value
optional
Optional: Provided if ‘with_values’ = true string

Namespace

Name Description Schema
indexes
optional
  < Index > array
name
optional
Name of namespace
Pattern : "^[A-Za-z0-9_\\-]*$"
string
storage
optional
  storage

storage

Name Description Schema
enabled
optional
If true, then documents will be stored to disc storage, else all data will be lost on server shutdown boolean

NamespaceMemStats

Name Description Schema
indexes
optional
Memory consumption of each namespace index < IndexMemStat > array
items_count
optional
Total count of documents in namespace integer
join_cache
optional
  JoinCacheMemStats
name
optional
Name of namespace string
optimization_completed
optional
Background indexes optimization has been completed boolean
query_cache
optional
  QueryCacheMemStats
replication
optional
  ReplicationStats
storage_enabled
optional
Shows if storage is enabled (however it may still be unavailable) boolean
storage_ok
optional
Status of disk storage (true, if storage is enabled and writable) boolean
storage_path
optional
Filesystem path to namespace storage string
storage_status
optional
More detailed info about storage status. May contain ‘OK’, ‘DISABLED’, ‘NO SPACE LEFT’ or last error description string
strings_waiting_to_be_deleted_size
optional
Size of strings deleted from namespace, but still used in queryResults integer
total
optional
Summary of total namespace memory consumption total
updated_unix_nano
optional
[[deprecated]]. do not use integer

total

Name Description Schema
cache_size
optional
Total memory consumption of namespace’s caches. e.g. idset and join caches integer
data_size
optional
Total memory size of stored documents, including system structures integer
index_optimizer_memory
optional
Total memory size, occupation by index optimizer (in bytes) integer
indexes_size
optional
Total memory consumption of namespace’s indexes integer

NamespacePerfStats

Name Description Schema
indexes
optional
Memory consumption of each namespace index < indexes > array
name
optional
Name of namespace string
selects
optional
  SelectPerfStats
transactions
optional
  TransactionsPerfStats
updates
optional
  UpdatePerfStats

indexes

Name Description Schema
name
optional
Name of index string
selects
optional
  SelectPerfStats
updates
optional
  UpdatePerfStats

Namespaces

Name Description Schema
items
optional
  < items > array
total_items
optional
Total count of namespaces integer

items

Name Description Schema
name
optional
Name of namespace string

NamespacesConfig

Name Description Schema
cache
optional
  cache
copy_policy_multiplier
optional
Disables copy policy if namespace size is greater than copy_policy_multiplier * start_copy_policy_tx_size integer
index_updates_counting_mode
optional
Enables ‘simple counting mode’ for index updates tracker. This will increase index optimization time, however may reduce insertion time boolean
join_cache_mode
optional
Join cache mode enum (aggressive)
lazyload
optional
Enable namespace lazy load (namespace should be loaded from disk on first call, not at reindexer startup) boolean
log_level
optional
Log level of queries core logger enum (none, error, warning, info, trace)
max_iterations_idset_preresult
optional
Maximum number of IdSet iterations of namespace preliminary result size for optimization
Minimum value : 201
Maximum value : 2147483647
integer
max_preselect_part
optional
Maximum preselect part of namespace’s items for optimization of inner join by injection of filters. If max_preselect_part is 0, then only max_preselect_size will be used. If max_preselect_size is 0 and max_preselect_part is 0, optimization with preselect will not be applied. If max_preselect_size is 0 and max_preselect_part is 1.0, then the optimization will always be applied
Default : 0.1
Minimum value : 0
Maximum value : 1
number (float)
max_preselect_size
optional
Maximum preselect size for optimization of inner join by injection of filters. If max_preselect_size is 0, then only max_preselect_part will be used. If max_preselect_size is 0 and max_preselect_part is 0, optimization with preselect will not be applied. If max_preselect_size is 0 and max_preselect_part is 1.0, then the optimization will always be applied
Minimum value : 0
integer
min_preselect_size
optional
Minimum preselect size for optimization of inner join by injection of filters. Min_preselect_size will be used as preselect limit if (max_preselect_part * ns.size) is less than this value
Minimum value : 0
integer
namespace
optional
Name of namespace, or * for setting to all namespaces string
optimization_sort_workers
optional
Maximum number of background threads of sort indexes optimization. 0 - disable sort optimizations integer
optimization_timeout_ms
optional
Timeout before background indexes optimization start after last update. 0 - disable optimizations integer
start_copy_policy_tx_size
optional
Enable namespace copying for transaction with steps count greater than this value (if copy_politics_multiplier also allows this) integer
sync_storage_flush_limit
optional
Enables synchronous storage flush inside write-calls, if async updates count is more than sync_storage_flush_limit. 0 - disables synchronous storage flush, in this case storage will be flushed in background thread only
Minimum value : 0
integer
tx_size_to_always_copy
optional
Force namespace copying for transaction with steps count greater than this value integer
unload_idle_threshold
optional
Unload namespace data from RAM after this idle timeout in seconds. If 0, then data should not be unloaded integer
wal_size
optional
Maximum WAL size for this namespace (maximum count of WAL records) integer

cache

Name Description Schema
ft_index_cache_size
optional
Max size of the fulltext indexes IdSets cache in bytes (per index). Each fulltext index has it’s own independent cache. This cache is used in any selections to store resulting sets of internal document IDs, FT ranks and highlighted areas (it does not stores documents’ content itself)
Minimum value : 0
integer
ft_index_hits_to_cache
optional
Default ‘hits to cache’ for fulltext index IdSets caches. This value determines how many requests required to put results into cache. For example with value of 2: first request will be executed without caching, second request will generate cache entry and put results into the cache and third request will get cached results. This value may be automatically increased if cache is invalidation too fast
Minimum value : 0
integer
index_idset_cache_size
optional
Max size of the index IdSets cache in bytes (per index). Each index has it’s own independent cache. This cache is used in any selections to store resulting sets of internal document IDs (it does not stores documents’ content itself)
Minimum value : 0
integer
index_idset_hits_to_cache
optional
Default ‘hits to cache’ for index IdSets caches. This value determines how many requests required to put results into cache. For example with value of 2: first request will be executed without caching, second request will generate cache entry and put results into the cache and third request will get cached results. This value may be automatically increased if cache is invalidation too fast
Minimum value : 0
integer
joins_preselect_cache_size
optional
Max size of the index IdSets cache in bytes for each namespace. This cache will be enabled only if ‘join_cache_mode’ property is not ‘off’. It stores resulting IDs, serialized JOINed queries and any other ‘preselect’ information for the JOIN queries (when target namespace is right namespace of the JOIN)
Minimum value : 0
integer
joins_preselect_hit_to_cache
optional
Default ‘hits to cache’ for joins preselect cache of the current namespace. This value determines how many requests required to put results into cache. For example with value of 2: first request will be executed without caching, second request will generate cache entry and put results into the cache and third request will get cached results. This value may be automatically increased if cache is invalidation too fast
Minimum value : 0
integer
query_count_cache_size
optional
Max size of the cache for COUNT_CACHED() aggregation in bytes for each namespace. This cache stores resulting COUNTs and serialized queries for the COUNT_CACHED() aggregations
Minimum value : 0
integer
query_count_hit_to_cache
optional
Default ‘hits to cache’ for COUNT_CACHED() aggregation of the current namespace. This value determines how many requests required to put results into cache. For example with value of 2: first request will be executed without caching, second request will generate cache entry and put results into the cache and third request will get cached results. This value may be automatically increased if cache is invalidation too fast
Minimum value : 0
integer

OnDef

Name Description Schema
cond
required
Condition operator enum (EQ, GT, GE, LE, LT, SET)
left_field
required
Field from left namespace (main query namespace) string
op
optional
Logic operator enum (AND, OR, NOT)
right_field
required
Field from right namespace (joined query namespace) string

ProfilingConfig

Name Description Schema
activitystats
optional
Enables tracking activity statistics
Default : false
boolean
long_queries_logging
optional
  LongQueriesLogging
memstats
optional
Enables tracking memory statistics
Default : true
boolean
perfstats
optional
Enables tracking overall performance statistics
Default : false
boolean
queries_threshold_us
optional
Minimum query execution time to be recorded in #queriesperfstats namespace integer
queriesperfstats
optional
Enables record queries performance statistics
Default : false
boolean

QueriesPerfStats

Name Description Schema
items
optional
Documents, matched specified filters < QueryPerfStats > array
total_items
optional
Total count of documents, matched specified filters integer

Query

Name Description Schema
aggregations
optional
Ask query calculate aggregation < AggregationsDef > array
drop_fields
optional
List of fields to be dropped < string > array
explain
optional
Add query execution explain information
Default : false
boolean
filters
optional
Filter for results documents < FilterDef > array
limit
optional
Maximum count of returned items integer
merge_queries
optional
Merged queries to be merged with main query < Query > array
namespace
required
Namespace name string
offset
optional
Offset of first returned item integer
req_total
optional
Ask query to calculate total documents, match condition
Default : "disabled"
enum (disabled, enabled, cached)
select_filter
optional
Filter fields of returned document. Can be dot separated, e.g ‘subobject.field’ < string > array
select_functions
optional
Add extra select functions to query < string > array
select_with_rank
optional
Output fulltext rank in QueryResult. Allowed only with fulltext query
Default : false
boolean
sort
optional
Specifies results sorting order < SortDef > array
strict_mode
optional
Strict mode for query. Adds additional check for fields(‘names’)/indexes(‘indexes’) existence in sorting and filtering conditions
Default : "names"
enum (none, names, indexes)
type
optional
Type of query enum (select, update, delete, truncate)
update_fields
optional
Fields to be updated < UpdateField > array

QueryCacheMemStats

Query cache stats. Stores results of SELECT COUNT(*) by Where conditions

Polymorphism : Composition

Name Description Schema
empty_count
optional
Count of empty elements slots in this cache integer
hit_count_limit
optional
Number of hits of queries, to store results in cache integer
items_count
optional
Count of used elements stored in this cache integer
total_size
optional
Total memory consumption by this cache integer

QueryColumnDef

Query columns for table outputs

Name Description Schema
max_chars
optional
Maximum count of chars in column number
name
optional
Column name string
width_chars
optional
Column width in chars number
width_percents
optional
Column width in percents of total width number

QueryItems

Name Description Schema
aggregations
optional
Aggregation functions results < AggregationResDef > array
cache_enabled
optional
Enables to client cache returned items. If false, then returned items has been modified by reindexer, e.g. by select filter, or by functions, and can’t be cached boolean
columns
optional
Columns for table output < QueryColumnDef > array
equal_position
optional
Array fields to be searched with equal array indexes < string > array
explain
optional
  ExplainDef
items
optional
Documents, matched query < object > array
namespaces
optional
Namespaces, used in query < string > array
query_total_items
optional
Total count of documents, matched query integer

QueryPerfStats

Performance statistics per each query

Polymorphism : Composition

Name Description Schema
last_sec_avg_latency_us
optional
Average latency (execution time) for queries to this object at last second integer
last_sec_avg_lock_time_us
optional
Average waiting time for acquiring lock to this object at last second integer
last_sec_qps
optional
Count of queries to this object, requested at last second integer
latency_stddev
optional
Standard deviation of latency values number
longest_query
optional
not normalized SQL representation of longest query string
max_latency_us
optional
Maximum latency value integer
min_latency_us
optional
Minimal latency value integer
query
optional
normalized SQL representation of query string
total_avg_latency_us
optional
Average latency (execution time) for queries to this object integer
total_avg_lock_time_us
optional
Average waiting time for acquiring lock to this object integer
total_queries_count
optional
Total count of queries to this object integer

ReplicationConfig

Name Description Schema
app_name
optional
Application name, used by replicator as a login tag string
cluster_id
optional
Cluster ID - must be same for client and for master integer
enable_compression
optional
Enable network traffic compression boolean
force_sync_on_logic_error
optional
force resync on logic error conditions boolean
force_sync_on_wrong_data_hash
optional
force resync on wrong data hash conditions boolean
master_dsn
optional
DSN to master. Only cproto schema is supported string
namespaces
optional
List of namespaces for replication. If empty, all namespaces. All replicated namespaces will become read only for slave < string > array
role
optional
Replication role enum (none, slave, master)
server_id
optional
Node identifier. Should be unique for each node in the replicated cluster (non-unique IDs are also allowed, but may lead to the inconsistency in some cases
Minimum value : 0
Maximum value : 999
integer
timeout_sec
optional
Network timeout for communication with master, in seconds integer

ReplicationStats

State of namespace replication

Name Description Schema
cluster_id
optional
Cluster ID - must be same for client and for master integer
data_count
optional
Items count in namespace integer
data_hash
optional
Hashsum of all records in namespace integer
error_code
optional
Error code of last replication integer
error_message
optional
Error message of last replication string
incarnation_counter
optional
Number of storage’s master <-> slave switches integer
last_lsn
optional
Last Log Sequence Number (LSN) of applied namespace modification integer
master_state
optional
State of current master namespace master_state
slave_mode
optional
If true, then namespace is in slave mode boolean
status
optional
Current replication status for this namespace enum (idle, error, fatal, syncing, none)
updated_unix_nano
optional
Last update time integer
wal_count
optional
Write Ahead Log (WAL) records count integer
wal_size
optional
Total memory consumption of Write Ahead Log (WAL) integer

master_state

Name Description Schema
data_count
optional
Items count in master namespace integer
data_hash
optional
Hashsum of all records in namespace integer
last_lsn
optional
Last Log Sequence Number (LSN) of applied namespace modification integer
updated_unix_nano
optional
Last update time integer

SchemaDef

Name Description Schema
additionalProperties
optional
Allow additional fields in this schema level. Allowed for objects only
Default : false
boolean
items
optional
  JsonObjectDef
properties
optional
  properties
required
optional
Array of required fieldsl. Allowed for objects only < string > array
type
optional
Entity type enum (object, string, number, array)

properties

Name Schema
field1
optional
JsonObjectDef
field2
optional
JsonObjectDef

SelectLogging

Name Description Schema
normalized
optional
Output the query in a normalized form
Default : false
boolean
threshold_us
optional
Threshold value for logging SELECT queries, if -1 logging is disabled integer

SelectPerfStats

Performance statistics for select operations

Polymorphism : Composition

Name Description Schema
last_sec_avg_latency_us
optional
Average latency (execution time) for queries to this object at last second integer
last_sec_avg_lock_time_us
optional
Average waiting time for acquiring lock to this object at last second integer
last_sec_qps
optional
Count of queries to this object, requested at last second integer
latency_stddev
optional
Standard deviation of latency values number
max_latency_us
optional
Maximum latency value integer
min_latency_us
optional
Minimal latency value integer
total_avg_latency_us
optional
Average latency (execution time) for queries to this object integer
total_avg_lock_time_us
optional
Average waiting time for acquiring lock to this object integer
total_queries_count
optional
Total count of queries to this object integer

SortDef

Specifies results sorting order

Name Description Schema
desc
optional
Descent or ascent sorting direction boolean
field
required
Field or index name for sorting string
values
optional
Optional: Documents with this values of field will be returned first < object > array

StatusResponse

Name Description Schema
description
optional
Text description of error details string
response_code
optional
Duplicates HTTP response code integer
success
optional
  boolean

SubQuery

Subquery object. It must contain either ‘select_filters’ for the single field, single aggregation or must be matched against ‘is null’/’is not null conditions’

Name Description Schema
aggregations
optional
Ask query calculate aggregation < SubQueryAggregationsDef > array
filters
optional
Filter for results documents < FilterDef > array
limit
optional
Maximum count of returned items integer
namespace
required
Namespace name string
offset
optional
Offset of first returned item integer
req_total
optional
Ask query to calculate total documents, match condition
Default : "disabled"
enum (disabled, enabled, cached)
select_filter
optional
Filter fields of returned document. Can be dot separated, e.g ‘subobject.field’ < string > array
sort
optional
Specifies results sorting order < SortDef > array

SubQueryAggregationsDef

Name Description Schema
fields
required
Fields or indexes names for aggregation function < string > array
type
required
Aggregation function enum (SUM, AVG, MIN, MAX)

SuggestItems

Name Description Schema
suggests
optional
Suggested query autocompletion variants < string > array

SysInfo

Name Description Schema
core_log
optional
Reindexer core log path string
current_allocated_bytes
optional
Current inuse allocated memory size in bytes integer
heap_size
optional
Current heap size in bytes integer
http_address
optional
HTTP server address string
http_log
optional
HTTP server log path string
log_level
optional
Log level, should be one of these: trace, debug, info, warning, error, critical string
pageheap_free
optional
Heap free size in bytes integer
pageheap_unmapped
optional
Unmapped free heap size in bytes integer
rpc_address
optional
RPC server address string
rpc_log
optional
RPC server log path string
server_log
optional
Reindexer server log path string
start_time
optional
Server start time in unix timestamp integer
storage_path
optional
Path to storage string
uptime
optional
Server uptime in seconds integer
version
optional
Server version string

SystemConfigItem

Name Description Schema
action
optional
  ActionCommand
namespaces
optional
  < NamespacesConfig > array
profiling
optional
  ProfilingConfig
replication
optional
  ReplicationConfig
type
required
Default : "profiling" enum (profiling, namespaces, replication, action)

TransactionLogging

Name Description Schema
avg_step_threshold_us
optional
Threshold value for the average step duration time in a transaction, if -1 logging is disabled integer
threshold_us
optional
Threshold value for total transaction commit time, if -1 logging is disabled integer

TransactionsPerfStats

Performance statistics for transactions

Name Description Schema
avg_commit_time_us
optional
Average transaction commit time usec integer
avg_copy_time_us
optional
Average namespace copy time usec integer
avg_prepare_time_us
optional
Average transaction preparation time usec integer
avg_steps_count
optional
Average steps count in transactions for this namespace integer
max_commit_time_us
optional
Maximum transaction commit time usec integer
max_copy_time_us
optional
Minimum namespace copy time usec integer
max_prepare_time_us
optional
Maximum transaction preparation time usec integer
max_steps_count
optional
Maximum steps count in transactions for this namespace integer
min_commit_time_us
optional
Minimum transaction commit time usec integer
min_copy_time_us
optional
Maximum namespace copy time usec integer
min_prepare_time_us
optional
Minimum transaction preparation time usec integer
min_steps_count
optional
Minimum steps count in transactions for this namespace integer
total_copy_count
optional
Total namespace copy operations integer
total_count
optional
Total transactions count for this namespace integer

UpdateDeleteLogging

Name Description Schema
normalized
optional
Output the query in a normalized form
Default : false
boolean
threshold_us
optional
Threshold value for logging UPDATE and DELETE queries, if -1 logging is disabled integer

UpdateField

Name Description Schema
is_array
optional
is updated value an array boolean
name
required
field name string
type
optional
update entry type enum (object, expression, value)
values
required
Values to update field with < object > array

UpdatePerfStats

Performance statistics for update operations

Polymorphism : Composition

Name Description Schema
last_sec_avg_latency_us
optional
Average latency (execution time) for queries to this object at last second integer
last_sec_avg_lock_time_us
optional
Average waiting time for acquiring lock to this object at last second integer
last_sec_qps
optional
Count of queries to this object, requested at last second integer
latency_stddev
optional
Standard deviation of latency values number
max_latency_us
optional
Maximum latency value integer
min_latency_us
optional
Minimal latency value integer
total_avg_latency_us
optional
Average latency (execution time) for queries to this object integer
total_avg_lock_time_us
optional
Average waiting time for acquiring lock to this object integer
total_queries_count
optional
Total count of queries to this object integer

UpdateResponse

Name Description Schema
updated
optional
Count of updated items integer