|
61 | 61 | externalDocs:
|
62 | 62 | description: Find out more
|
63 | 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 |
64 | 69 | paths:
|
65 | 70 | /collections:
|
66 | 71 | get:
|
@@ -1761,6 +1766,97 @@ paths:
|
1761 | 1766 | application/json:
|
1762 | 1767 | schema:
|
1763 | 1768 | $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" |
1764 | 1860 | components:
|
1765 | 1861 | schemas:
|
1766 | 1862 | CollectionSchema:
|
@@ -1925,6 +2021,10 @@ components:
|
1925 | 2021 | type: boolean
|
1926 | 2022 | description: >
|
1927 | 2023 | 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 |
1928 | 2028 | token_separators:
|
1929 | 2029 | type: array
|
1930 | 2030 | description: >
|
@@ -3654,6 +3754,33 @@ components:
|
3654 | 3754 | id:
|
3655 | 3755 | type: string
|
3656 | 3756 | 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 |
3657 | 3784 | securitySchemes:
|
3658 | 3785 | api_key_header:
|
3659 | 3786 | type: apiKey
|
|
0 commit comments