From fa13a1e838244cb3708ab8f0139149ac000fae37 Mon Sep 17 00:00:00 2001 From: Hayden Hung Hoang Date: Fri, 22 Aug 2025 21:46:11 +0700 Subject: [PATCH 1/4] fix typos --- openapi.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openapi.yml b/openapi.yml index a6a03be..9e4646e 100644 --- a/openapi.yml +++ b/openapi.yml @@ -839,7 +839,7 @@ paths: get: tags: - documents - summary: Retreive a document + summary: Retrieve a document description: Fetch an individual document from a collection by using its ID. operationId: getDocument parameters: @@ -2869,7 +2869,7 @@ components: filter_by: description: - Filter conditions for refining youropen api validator search results. Separate + Filter conditions for refining your open api validator search results. Separate multiple conditions with &&. type: string example: "num_employees:>100 && country: [USA, UK]" @@ -3876,7 +3876,7 @@ components: description: > Dictates the direction in which the words in the query must be dropped when the original words in the query do not appear in any document. Values: right_to_left (default), left_to_right, both_sides:3 - A note on both_sides:3 - for queries upto 3 tokens (words) in length, this mode will drop tokens from both sides and exhaustively rank all matching results. + A note on both_sides:3 - for queries up to 3 tokens (words) in length, this mode will drop tokens from both sides and exhaustively rank all matching results. If query length is greater than 3 words, Typesense will just fallback to default behavior of right_to_left ConversationModelCreateSchema: required: From bbdf152a171245b0b44a1fb250658c15fe34f31b Mon Sep 17 00:00:00 2001 From: Hayden Hung Hoang Date: Fri, 22 Aug 2025 21:57:56 +0700 Subject: [PATCH 2/4] feat: added operations clear cache --- openapi.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/openapi.yml b/openapi.yml index 9e4646e..44f9b27 100644 --- a/openapi.yml +++ b/openapi.yml @@ -1368,6 +1368,21 @@ paths: application/json: schema: $ref: "#/components/schemas/SuccessStatus" + /operations/cache/clear: + post: + tags: + - operations + summary: Clear the cached responses of search requests in the LRU cache. + description: + Clear the cached responses of search requests that are sent with `use_cache` parameter in the LRU cache. + operationId: clearCache + responses: + '200': + description: Clear cache succeeded. + content: + application/json: + schema: + $ref: "#/components/schemas/SuccessStatus" /multi_search: post: operationId: multiSearch From 96a26101227b76fed471c9dd46ac0d6eadebb0dc Mon Sep 17 00:00:00 2001 From: Hayden Hung Hoang Date: Fri, 22 Aug 2025 22:03:26 +0700 Subject: [PATCH 3/4] feat: added operations compact db --- openapi.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/openapi.yml b/openapi.yml index 44f9b27..289aad8 100644 --- a/openapi.yml +++ b/openapi.yml @@ -1383,6 +1383,22 @@ paths: application/json: schema: $ref: "#/components/schemas/SuccessStatus" + /operations/db/compact: + post: + tags: + - operations + summary: Compacting the on-disk database + description: + Typesense uses RocksDB to store your documents on the disk. If you do frequent writes or updates, you could benefit from running a compaction of the underlying RocksDB database. + This could reduce the size of the database and decrease read latency. While the database will not block during this operation, we recommend running it during off-peak hours. + operationId: compactDb + responses: + '200': + description: Compacting the on-disk database succeeded. + content: + application/json: + schema: + $ref: "#/components/schemas/SuccessStatus" /multi_search: post: operationId: multiSearch From a06e9433f11f689da3b501c0c0bc0480b30fb78a Mon Sep 17 00:00:00 2001 From: Hayden Hung Hoang Date: Sun, 24 Aug 2025 18:36:43 +0700 Subject: [PATCH 4/4] feat: operations API toggle slow request log --- openapi.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/openapi.yml b/openapi.yml index 289aad8..de19d1a 100644 --- a/openapi.yml +++ b/openapi.yml @@ -1399,6 +1399,35 @@ paths: application/json: schema: $ref: "#/components/schemas/SuccessStatus" + /config: + post: + tags: + - operations + summary: Toggle Slow Request Log + description: + Enable logging of requests that take over a defined threshold of time. + Default is `-1` which disables slow request logging. + Slow requests are logged to the primary log file, with the prefix SLOW REQUEST. + operationId: toggleSlowRequestLog + requestBody: + content: + application/json: + schema: + type: object + properties: + log-slow-requests-time-ms: + type: integer + required: + - log-slow-requests-time-ms + example: | + {"log-slow-requests-time-ms": 2000} + responses: + '200': + description: Compacting the on-disk database succeeded. + content: + application/json: + schema: + $ref: "#/components/schemas/SuccessStatus" /multi_search: post: operationId: multiSearch