Skip to content

Commit de3c87a

Browse files
authored
Merge pull request #88 from tharropoulos/v28-changes
v28.0
2 parents a5fcd1d + 656fbf1 commit de3c87a

File tree

1 file changed

+204
-7
lines changed

1 file changed

+204
-7
lines changed

openapi.yml

+204-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ openapi: 3.0.3
22
info:
33
title: Typesense API
44
description: "An open source search engine for building delightful search experiences."
5-
version: '27.0'
5+
version: '28.0'
66
externalDocs:
77
description: Find out more about Typsesense
88
url: https://typesense.org
@@ -28,7 +28,7 @@ tags:
2828
description: Typesense can aggregate search queries for both analytics purposes and for query suggestions.
2929
externalDocs:
3030
description: Find out more
31-
url: https://typesense.org/docs/26.0/api/analytics-query-suggestions.html
31+
url: https://typesense.org/docs/28.0/api/analytics-query-suggestions.html
3232
- name: keys
3333
description: Manage API Keys with fine-grain access control
3434
externalDocs:
@@ -40,27 +40,32 @@ tags:
4040
description: Manage Typesense cluster
4141
externalDocs:
4242
description: Find out more
43-
url: https://typesense.org/docs/26.0/api/cluster-operations.html
43+
url: https://typesense.org/docs/28.0/api/cluster-operations.html
4444
- name: stopwords
4545
description: Manage stopwords sets
4646
externalDocs:
4747
description: Find out more
48-
url: https://typesense.org/docs/26.0/api/stopwords.html
48+
url: https://typesense.org/docs/28.0/api/stopwords.html
4949
- name: presets
5050
description: Store and reference search parameters
5151
externalDocs:
5252
description: Find out more
53-
url: https://typesense.org/docs/26.0/api/search.html#presets
53+
url: https://typesense.org/docs/28.0/api/search.html#presets
5454
- name: conversations
5555
description: Conversational Search (RAG)
5656
externalDocs:
5757
description: Find out more
58-
url: https://typesense.org/docs/27.0/api/conversational-search-rag.html
58+
url: https://typesense.org/docs/28.0/api/conversational-search-rag.html
5959
- name: synonyms
6060
description: Manage synonyms
6161
externalDocs:
6262
description: Find out more
63-
url: https://typesense.org/docs/27.0/api/synonyms.html
63+
url: https://typesense.org/docs/28.0/api/synonyms.html
64+
- name: stemming
65+
description: Manage stemming dictionaries
66+
externalDocs:
67+
description: Find out more
68+
url: https://typesense.org/docs/28.0/api/stemming.html
6469
paths:
6570
/collections:
6671
get:
@@ -357,6 +362,9 @@ paths:
357362
type: integer
358363
ignore_not_found:
359364
type: boolean
365+
truncate:
366+
description: When true, removes all documents from the collection while preserving the collection and its schema.
367+
type: boolean
360368
responses:
361369
'200':
362370
description: Documents successfully deleted
@@ -1263,6 +1271,22 @@ paths:
12631271
application/json:
12641272
schema:
12651273
$ref: "#/components/schemas/HealthStatus"
1274+
/operations/schema_changes:
1275+
get:
1276+
tags:
1277+
- operations
1278+
summary: Get the status of in-progress schema change operations
1279+
description: Returns the status of any ongoing schema change operations. If no schema changes are in progress, returns an empty response.
1280+
operationId: getSchemaChanges
1281+
responses:
1282+
'200':
1283+
description: List of schema changes in progress
1284+
content:
1285+
application/json:
1286+
schema:
1287+
type: array
1288+
items:
1289+
$ref: "#/components/schemas/SchemaChangeStatus"
12661290
/operations/snapshot:
12671291
post:
12681292
tags:
@@ -1742,6 +1766,97 @@ paths:
17421766
application/json:
17431767
schema:
17441768
$ref: '#/components/schemas/ApiResponse'
1769+
/stemming/dictionaries:
1770+
get:
1771+
tags:
1772+
- stemming
1773+
summary: List all stemming dictionaries
1774+
description: Retrieve a list of all available stemming dictionaries.
1775+
operationId: listStemmingDictionaries
1776+
responses:
1777+
'200':
1778+
description: List of all dictionaries
1779+
content:
1780+
application/json:
1781+
schema:
1782+
type: object
1783+
properties:
1784+
dictionaries:
1785+
type: array
1786+
items:
1787+
type: string
1788+
example: ["irregular-plurals", "company-terms"]
1789+
1790+
/stemming/dictionaries/{dictionaryId}:
1791+
get:
1792+
tags:
1793+
- stemming
1794+
summary: Retrieve a stemming dictionary
1795+
description: Fetch details of a specific stemming dictionary.
1796+
operationId: getStemmingDictionary
1797+
parameters:
1798+
- name: dictionaryId
1799+
in: path
1800+
description: The ID of the dictionary to retrieve
1801+
required: true
1802+
schema:
1803+
type: string
1804+
example: irregular-plurals
1805+
responses:
1806+
'200':
1807+
description: Stemming dictionary details
1808+
content:
1809+
application/json:
1810+
schema:
1811+
$ref: "#/components/schemas/StemmingDictionary"
1812+
'404':
1813+
description: Dictionary not found
1814+
content:
1815+
application/json:
1816+
schema:
1817+
$ref: "#/components/schemas/ApiResponse"
1818+
1819+
/stemming/dictionaries/import:
1820+
post:
1821+
tags:
1822+
- stemming
1823+
summary: Import a stemming dictionary
1824+
description: Upload a JSONL file containing word mappings to create or update a stemming dictionary.
1825+
operationId: importStemmingDictionary
1826+
parameters:
1827+
- name: id
1828+
in: query
1829+
description: The ID to assign to the dictionary
1830+
required: true
1831+
schema:
1832+
type: string
1833+
example: irregular-plurals
1834+
requestBody:
1835+
description: The JSONL file containing word mappings
1836+
required: true
1837+
content:
1838+
application/json:
1839+
schema:
1840+
type: string
1841+
example: |
1842+
{"word": "people", "root": "person"}
1843+
{"word": "children", "root": "child"}
1844+
responses:
1845+
'200':
1846+
description: Dictionary successfully imported
1847+
content:
1848+
application/octet-stream:
1849+
schema:
1850+
type: string
1851+
example: >
1852+
{"word": "people", "root": "person"}
1853+
{"word": "children", "root": "child"}
1854+
'400':
1855+
description: Bad request, see error message for details
1856+
content:
1857+
application/json:
1858+
schema:
1859+
$ref: "#/components/schemas/ApiResponse"
17451860
components:
17461861
schemas:
17471862
CollectionSchema:
@@ -1906,6 +2021,33 @@ components:
19062021
type: boolean
19072022
description: >
19082023
Values are stemmed before indexing in-memory. Default: false.
2024+
stem_dictionary:
2025+
type: string
2026+
description: Name of the stemming dictionary to use for this field
2027+
example: irregular-plurals
2028+
token_separators:
2029+
type: array
2030+
description: >
2031+
List of symbols or special characters to be used for
2032+
splitting the text into individual words in addition to space and new-line characters.
2033+
items:
2034+
type: string # characters only
2035+
# Could `enum` be used instead, given it's symbols/special *characters*, e.g.:
2036+
# enum: ["@", "!", ".", "/", ","]
2037+
minLength: 1
2038+
maxLength: 1
2039+
default: []
2040+
symbols_to_index:
2041+
type: array
2042+
description: >
2043+
List of symbols or special characters to be indexed.
2044+
items:
2045+
type: string # characters only
2046+
# Could `enum` be used instead, given it's symbols/special *characters*, e.g.:
2047+
# enum: ["@", "!", ".", "/", ","]
2048+
minLength: 1
2049+
maxLength: 1
2050+
default: []
19092051
embed:
19102052
type: object
19112053
required:
@@ -2353,6 +2495,18 @@ components:
23532495
properties:
23542496
ok:
23552497
type: boolean
2498+
SchemaChangeStatus:
2499+
type: object
2500+
properties:
2501+
collection:
2502+
type: string
2503+
description: Name of the collection being modified
2504+
validated_docs:
2505+
type: integer
2506+
description: Number of documents that have been validated
2507+
altered_docs:
2508+
type: integer
2509+
description: Number of documents that have been altered
23562510
SuccessStatus:
23572511
type: object
23582512
required:
@@ -2527,6 +2681,12 @@ components:
25272681
type: string
25282682
example: "num_employees:>100 && country: [USA, UK]"
25292683

2684+
max_filter_by_candidates:
2685+
description:
2686+
Controls the number of similar words that Typesense considers during fuzzy search
2687+
on filter_by values. Useful for controlling prefix matches like company_name:Acm*.
2688+
type: integer
2689+
25302690
sort_by:
25312691
description:
25322692
A list of numerical fields and their corresponding sort orders
@@ -3218,6 +3378,9 @@ components:
32183378
required:
32193379
- searches
32203380
properties:
3381+
union:
3382+
type: boolean
3383+
description: When true, merges the search results from each search query into a single ordered set of hits.
32213384
searches:
32223385
type: array
32233386
items:
@@ -3234,6 +3397,13 @@ components:
32343397
x-typesense-api-key:
32353398
type: string
32363399
description: A separate search API key for each search within a multi_search request
3400+
rerank_hybrid_matches:
3401+
type: boolean
3402+
description: >
3403+
When true, computes both text match and vector distance scores for all matches in hybrid search.
3404+
Documents found only through keyword search will get a vector distance score, and
3405+
documents found only through vector search will get a text match score.
3406+
default: false
32373407
FacetCounts:
32383408
type: object
32393409
properties:
@@ -3584,6 +3754,33 @@ components:
35843754
id:
35853755
type: string
35863756
description: An explicit id for the model, otherwise the API will return a response with an auto-generated conversation model id.
3757+
StemmingDictionary:
3758+
type: object
3759+
required:
3760+
- id
3761+
- words
3762+
properties:
3763+
id:
3764+
type: string
3765+
description: Unique identifier for the dictionary
3766+
example: irregular-plurals
3767+
words:
3768+
type: array
3769+
description: List of word mappings in the dictionary
3770+
items:
3771+
type: object
3772+
required:
3773+
- word
3774+
- root
3775+
properties:
3776+
word:
3777+
type: string
3778+
description: The word form to be stemmed
3779+
example: people
3780+
root:
3781+
type: string
3782+
description: The root form of the word
3783+
example: person
35873784
securitySchemes:
35883785
api_key_header:
35893786
type: apiKey

0 commit comments

Comments
 (0)