Open API spec diff
264 removals
755 lines
220 additions
694 lines
openapi: 3.0.3
openapi: 3.0.3
info:
info:
title: Typesense API
title: Typesense API
description: "An open source search engine for building delightful search experiences."
description: "An open source search engine for building delightful search experiences."
version: 0.17.0
version: 0.17.0
externalDocs:
externalDocs:
description: Find out more about Typsesense
description: Find out more about Typsesense
url: https://typesense.org
url: https://typesense.org
security:
security:
- api_key_header: []
- api_key_header: []
tags:
tags:
- name: collections
- name: collections
description: A collection is defined by a schema
description: A collection is defined by a schema
externalDocs:
externalDocs:
description: Find out more
description: Find out more
url: https://typesense.org/api/#create-collection
url: https://typesense.org/api/#create-collection
- name: documents
- name: documents
description: A document is an individual record to be indexed and belongs to a collection
description: A document is an individual record to be indexed and belongs to a collection
externalDocs:
externalDocs:
description: Find out more
description: Find out more
url: https://typesense.org/api/#index-document
url: https://typesense.org/api/#index-document
- name: promote
- name: promote
description: Promote certain documents over others
description: Promote certain documents over others
externalDocs:
externalDocs:
description: Find out more
description: Find out more
url: https://typesense.org/docs/0.18.0/api/#curation
url: https://typesense.org/docs/0.18.0/api/#curation
- name: keys
- name: keys
description: Manage API Keys with fine-grain access control
description: Manage API Keys with fine-grain access control
externalDocs:
externalDocs:
description: Find out more
description: Find out more
url: https://typesense.org/docs/0.18.0/api/#api-keys
url: https://typesense.org/docs/0.18.0/api/#api-keys
- name: debug
- name: debug
description: Debugging information
description: Debugging information
- name: operations
- name: operations
description: Manage Typesense cluster
description: Manage Typesense cluster
externalDocs:
externalDocs:
description: Find out more
description: Find out more
url: https://typesense.org/docs/0.18.0/api/#cluster-operations
url: https://typesense.org/docs/0.18.0/api/#cluster-operations
paths:
paths:
/collections:
/collections:
get:
get:
tags:
tags:
- collections
- collections
summary: List all collections
summary: List all collections
description:
description:
Returns a summary of all your collections. The collections are
Returns a summary of all your collections. The collections are
returned sorted by creation date, with the most recent collections appearing
returned sorted by creation date, with the most recent collections appearing
first.
first.
operationId: getCollections
operationId: getCollections
responses:
responses:
200:
200:
description: List of all collections
description: List of all collections
content:
content:
application/json:
application/json:
schema:
schema:
type: array
type: array
x-go-type: "[]*Collection"
x-go-type: "[]*Collection"
items:
items:
$ref: "#/components/schemas/Collection"
$ref: "#/components/schemas/Collection"
post:
post:
tags:
tags:
- collections
- collections
summary: Create a new collection
summary: Create a new collection
description:
description:
When a collection is created, we give it a name and describe the
When a collection is created, we give it a name and describe the
fields that will be indexed from the documents added to the collection.
fields that will be indexed from the documents added to the collection.
operationId: createCollection
operationId: createCollection
requestBody:
requestBody:
description: The collection object to be created
description: The collection object to be created
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/CollectionSchema"
$ref: "#/components/schemas/CollectionSchema"
required: true
required: true
responses:
responses:
201:
201:
description: Collection successfully created
description: Collection successfully created
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/Collection"
$ref: "#/components/schemas/Collection"
409:
409:
description: Collection already exists
description: Collection already exists
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/ApiResponse"
$ref: "#/components/schemas/ApiResponse"
/collections/{collectionName}:
/collections/{collectionName}:
get:
get:
tags:
tags:
- collections
- collections
summary: Retrieve a single collection
summary: Retrieve a single collection
description: Retrieve the details of a collection, given its name.
description: Retrieve the details of a collection, given its name.
operationId: getCollection
operationId: getCollection
parameters:
parameters:
- name: collectionName
- name: collectionName
in: path
in: path
description: The name of the collection to retrieve
description: The name of the collection to retrieve
required: true
required: true
schema:
schema:
type: string
type: string
responses:
responses:
200:
200:
description: Collection fetched
description: Collection fetched
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/Collection"
$ref: "#/components/schemas/Collection"
404:
404:
description: Collection not found
description: Collection not found
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/ApiResponse"
$ref: "#/components/schemas/ApiResponse"
delete:
delete:
tags:
tags:
- collections
- collections
summary: Delete a collection
summary: Delete a collection
description:
description:
Permanently drops a collection. This action cannot be undone. For
Permanently drops a collection. This action cannot be undone. For
large collections, this might have an impact on read latencies.
large collections, this might have an impact on read latencies.
operationId: deleteCollection
operationId: deleteCollection
parameters:
parameters:
- name: collectionName
- name: collectionName
in: path
in: path
description: The name of the collection to delete
description: The name of the collection to delete
required: true
required: true
schema:
schema:
type: string
type: string
responses:
responses:
200:
200:
description: Collection deleted
description: Collection deleted
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/Collection"
$ref: "#/components/schemas/Collection"
404:
404:
description: Collection not found
description: Collection not found
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/ApiResponse"
$ref: "#/components/schemas/ApiResponse"
/collections/{collectionName}/documents:
/collections/{collectionName}/documents:
post:
post:
tags:
tags:
- documents
- documents
summary: Index a document
summary: Index a document
description:
description:
A document to be indexed in a given collection must conform to
A document to be indexed in a given collection must conform to
the schema of the collection.
the schema of the collection.
operationId: indexDocument
operationId: indexDocument
parameters:
parameters:
- name: collectionName
- name: collectionName
in: path
in: path
description: The name of the collection to add the document to
description: The name of the collection to add the document to
required: true
required: true
schema:
schema:
type: string
type: string
- name: action
- name: action
in: query
in: query
description: Additional action to perform
description: Additional action to perform
schema:
schema:
type: string
type: string
example: upsert
example: upsert
enum:
enum:
- upsert
- upsert
requestBody:
requestBody:
description: The document object to be indexed
description: The document object to be indexed
content:
content:
application/json:
application/json:
schema:
schema:
type: object
type: object
description: Can be any key-value pair
description: Can be any key-value pair
x-go-type: "interface{}"
x-go-type: "interface{}"
required: true
required: true
responses:
responses:
201:
201:
description: Document successfully created/indexed
description: Document successfully created/indexed
content:
content:
application/json:
application/json:
schema:
schema:
type: object
type: object
description: Can be any key-value pair
description: Can be any key-value pair
404:
404:
description: Collection not found
description: Collection not found
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/ApiResponse"
$ref: "#/components/schemas/ApiResponse"
delete:
delete:
tags:
tags:
- documents
- documents
summary: Delete a bunch of documents
summary: Delete a bunch of documents
description:
description:
Delete a bunch of documents that match a specific filter condition.
Delete a bunch of documents that match a specific filter condition.
Use the `batch_size` parameter to control the number of documents that
Use the `batch_size` parameter to control the number of documents that
should deleted at a time. A larger value will speed up deletions, but will
should deleted at a time. A larger value will speed up deletions, but will
impact performance of other operations running on the server.
impact performance of other operations running on the server.
operationId: deleteDocuments
operationId: deleteDocuments
parameters:
parameters:
- name: collectionName
- name: collectionName
in: path
in: path
description: The name of the collection to delete documents from
description: The name of the collection to delete documents from
required: true
required: true
schema:
schema:
type: string
type: string
- name: filter_by
- name: deleteDocumentsParameters
in: query
description:
Filter conditions for refining your documents to delete. Separate
multiple conditions with &&.
schema:
type: string
example: "num_employees:>100 && country: [USA, UK]"
required: true
- name: batch_size
in: query
in: query
description:
Batch size parameter controls the number of documents that should be deleted
at a time. A larger value will speed up deletions, but will impact performance
of other operations running on the server.
required: true
schema:
schema:
type: integer
type: object
properties:
filter_by:
type: string
example: "num_employees:>100 && country: [USA, UK]"
batch_size:
description:
Batch size parameter controls the number of documents that should be deleted
at a time. A larger value will speed up deletions, but will impact performance
of other operations running on the server.
type: integer
responses:
responses:
200:
200:
description: Documents successfully deleted
description: Documents successfully deleted
content:
content:
application/json:
application/json:
schema:
schema:
type: object
type: object
required:
required:
- num_deleted
- num_deleted
properties:
properties:
num_deleted:
num_deleted:
type: integer
type: integer
404:
404:
description: Collection not found
description: Collection not found
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/ApiResponse"
$ref: "#/components/schemas/ApiResponse"
/collections/{collectionName}/documents/search:
/collections/{collectionName}/documents/search:
get:
get:
tags:
tags:
- documents
- documents
summary: Search for documents in a collection
summary: Search for documents in a collection
description: Search for documents in a collection that match the search criteria.
description: Search for documents in a collection that match the search criteria.
operationId: searchCollection
operationId: searchCollection
parameters:
parameters:
- name: collectionName
- name: collectionName
in: path
in: path
description: The name of the collection to search for the document under
description: The name of the collection to search for the document under
required: true
required: true
schema:
schema:
type: string
type: string
- name: q
- name: searchParameters
in: query
description: The query text to search for in the collection.
Use * as the search string to return all documents.
This is typically useful when used in conjunction with filter_by.
required: true
schema:
type: string
- name: query_by
in: query
description: A list of `string` fields that should be queried
against. Multiple fields are separated with a comma.
required: true
required: true
style: form
explode: false
schema:
type: array
items:
type: string
- name: query_by_weights
in: query
description:
The relative weight to give each `query_by` field when ranking results.
This can be used to boost fields in priority, when looking for matches.
Multiple fields are separated with a comma.
style: form
explode: false
schema:
type: array
items:
type: string
- name: max_hits
in: query
description: >
Maximum number of hits returned. Increasing this value might
increase search latency. Default: 500. Use `all` to return all hits found.
schema:
oneOf:
- type: integer
example: 500
- type: string
example: all
enum:
- all
- name: prefix
in: query
description:
Boolean field to indicate that the last word in the query should
be treated as a prefix, and not as a whole word. This is used for building
autocomplete and instant search interfaces. Defaults to true.
schema:
type: boolean
- name: filter_by
in: query
description:
Filter conditions for refining your search results. Separate
multiple conditions with &&.
schema:
type: string
example: "num_employees:>100 && country: [USA, UK]"
- name: sort_by
in: query
description:
A list of numerical fields and their corresponding sort orders
that will be used for ordering your results.
Up to 3 sort fields can be specified.
The text similarity score is exposed as a special `_text_match` field that
you can use in the list of sorting fields.
If no `sort_by` parameter is specified, results are sorted by
`_text_match:desc,default_sorting_field:desc`
style: form
explode: false
schema:
type: array
items:
type: string
example: num_employees:desc
- name: facet_by
in: query
description:
A list of fields that will be used for faceting your results
on. Separate multiple fields with a comma.
style: form
explode: false
schema:
type: array
items:
type: string
- name: max_facet_values
in: query
description: Maximum number of facet values to be returned.
schema:
type: integer
- name: facet_query
in: query
description:
Facet values that are returned can now be filtered via this parameter.
The matching facet text is also highlighted. For example, when faceting
by `category`, you can set `facet_query=category:shoe` to return only
facet values that contain the prefix "shoe".
schema:
type: string
- name: num_typos
in: query
description: >
The number of typographical errors (1 or 2) that would be tolerated.
Default: 2
schema:
type: integer
- name: page
in: query
description: Results from this specific page number would be fetched.
schema:
type: integer
- name: per_page
in: query
description: "Number of results to fetch per page. Default: 10"
schema:
type: integer
- name: group_by
in: query
description:
You can aggregate search results into groups or buckets by specify
one or more `group_by` fields. Separate multiple fields with a comma.
To group on a particular field, it must be a faceted field.
style: form
explode: false
schema:
type: array
items:
type: string
- name: group_limit
in: query
description: >
Maximum number of hits to be returned for every group. If the `group_limit` is
set as `K` then only the top K hits in each group are returned in the response.
Default: 3
schema:
type: integer
- name: include_fields
in: query
description: List of fields from the document to include in the search result
style: form
explode: false
schema:
type: array
items:
type: string
- name: exclude_fields
in: query
description: List of fields from the document to exclude in the search result
style: form
explode: false
schema:
type: array
items:
type: string
- name: highlight_full_fields
in: query
description: List of fields which should be highlighted fully without snippeting
style: form
explode: false
schema:
type: array
items:
type: string
- name: highlight_affix_num_tokens
in: query
description: >
The number of tokens that should surround the highlighted text on each side.
Default: 4
schema:
type: integer
- name: highlight_start_tag
in: query
description: >
The start tag used for the highlighted snippets.
Default: `<mark>`
schema:
type: string
- name: highlight_end_tag
in: query
description: >
The end tag used for the highlighted snippets.
Default: `</mark>`
schema:
type: string
- name: snippet_threshold
in: query
description: >
Field values under this length will be fully highlighted, instead of showing
a snippet of relevant portion. Default: 30
schema:
type: integer
- name: drop_tokens_threshold
in: query
description: >
If the number of results found for a specific query is less than
this number, Typesense will attempt to drop the tokens in the query until
enough results are found. Tokens that have the least individual hits
are dropped first. Set to 0 to disable. Default: 10
schema:
type: integer
- name: typo_tokens_threshold
in: query
in: query
description: >
If the number of results found for a specific query is less than this number,
Typesense will attempt to look for tokens with more typos until
enough results are found. Default: 100
schema:
schema:
type: integer
type: object
- name: pinned_hits
properties:
in: query
q:
description: >
description: The query text to search for in the collection.
A list of records to unconditionally include in the search results
Use * as the search string to return all documents.
at specific positions. An example use case would be to feature or promote
This is typically useful when used in conjunction with filter_by.
certain items on the top of search results.
type: string
A list of `record_id:hit_position`. Eg: to include a record with ID 123
query_by:
at Position 1 and another record with ID 456 at Position 5,
description: A list of `string` fields that should be queried
you'd specify `123:1,456:5`.
against. Multiple fields are separated with a comma.
type: array
items:
type: string
query_by_weights:
description:
The relative weight to give each `query_by` field when ranking results.
This can be used to boost fields in priority, when looking for matches.
Multiple fields are separated with a comma.
type: array
items:
type: string
max_hits:
description: >
Maximum number of hits returned. Increasing this value might
increase search latency. Default: 500. Use `all` to return all hits found.
oneOf:
- type: integer
example: 500
- type: string
example: all
enum:
- all
prefix:
description:
Boolean field to indicate that the last word in the query should
be treated as a prefix, and not as a whole word. This is used for building
autocomplete and instant search interfaces. Defaults to true.
type: array
items:
type: boolean
filter_by:
description:
Filter conditions for refining your search results. Separate
multiple conditions with &&.
type: string
example: "num_employees:>100 && country: [USA, UK]"
sort_by:
description:
A list of numerical fields and their corresponding sort orders
that will be used for ordering your results.
Up to 3 sort fields can be specified.
The text similarity score is exposed as a special `_text_match` field that
you can use in the list of sorting fields.
If no `sort_by` parameter is specified, results are sorted by
`_text_match:desc,default_sorting_field:desc`
type: array
items:
type: string
example: num_employees:desc
facet_by:
description:
A list of fields that will be used for faceting your results
on. Separate multiple fields with a comma.
type: array
items:
type: string
max_facet_values:
description: Maximum number of facet values to be returned.
type: integer
facet_query:
description:
Facet values that are returned can now be filtered via this parameter.
The matching facet text is also highlighted. For example, when faceting
by `category`, you can set `facet_query=category:shoe` to return only
facet values that contain the prefix "shoe".
type: string
num_typos:
description: >
The number of typographical errors (1 or 2) that would be tolerated.
Default: 2
type: integer
page:
description: Results from this specific page number would be fetched.
type: integer
per_page:
description: "Number of results to fetch per page. Default: 10"
type: integer
group_by:
description:
You can aggregate search results into groups or buckets by specify
one or more `group_by` fields. Separate multiple fields with a comma.
To group on a particular field, it must be a faceted field.
type: array
items:
type: string
group_limit:
description: >
Maximum number of hits to be returned for every group. If the `group_limit` is
set as `K` then only the top K hits in each group are returned in the response.
Default: 3
type: integer
include_fields:
description: List of fields from the document to include in the search result
type: array
items:
type: string
exclude_fields:
description: List of fields from the document to exclude in the search result
type: array
items:
type: string
highlight_full_fields:
description: List of fields which should be highlighted fully without snippeting
type: array
items:
type: string
highlight_affix_num_tokens:
description: >
The number of tokens that should surround the highlighted text on each side.
Default: 4
type: integer
highlight_start_tag:
description: >
The start tag used for the highlighted snippets.
Default: `<mark>`
type: string
highlight_end_tag:
description: >
The end tag used for the highlighted snippets.
Default: `</mark>`
type: string
snippet_threshold:
description: >
Field values under this length will be fully highlighted, instead of showing
a snippet of relevant portion. Default: 30
type: integer
drop_tokens_threshold:
description: >
If the number of results found for a specific query is less than
this number, Typesense will attempt to drop the tokens in the query until
enough results are found. Tokens that have the least individual hits
are dropped first. Set to 0 to disable. Default: 10
type: integer
typo_tokens_threshold:
description: >
If the number of results found for a specific query is less than this number,
Typesense will attempt to look for tokens with more typos until
enough results are found. Default: 100
type: integer
pinned_hits:
description: >
A list of records to unconditionally include in the search results
at specific positions. An example use case would be to feature or promote
certain items on the top of search results.
A list of `record_id:hit_position`. Eg: to include a record with ID 123
at Position 1 and another record with ID 456 at Position 5,
you'd specify `123:1,456:5`.
You could also use the Overrides feature to override search results based
You could also use the Overrides feature to override search results based
on rules. Overrides are applied first, followed by `pinned_hits` and
on rules. Overrides are applied first, followed by `pinned_hits` and
finally `hidden_hits`.
finally `hidden_hits`.
style: form
type: array
explode: false
items:
schema:
type: string
type: array
hidden_hits:
items:
description: >
type: string
A list of records to unconditionally hide from search results.
- name: hidden_hits
A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456,
in: query
you'd specify `123,456`.
description: >
A list of records to unconditionally hide from search results.
A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456,
you'd specify `123,456`.
You could also use the Overrides feature to override search results based
You could also use the Overrides feature to override search results based
on rules. Overrides are applied first, followed by `pinned_hits` and
on rules. Overrides are applied first, followed by `pinned_hits` and
finally `hidden_hits`.
finally `hidden_hits`.
style: form
type: array
explode: false
items:
schema:
type: string
type: array
highlight_fields:
items:
description: >
type: string
A list of custom fields that must be highlighted even if you don't query
for them
type: array
items:
type: string
pre_segmented_query:
description: >
You can index content from any logographic language into Typesense if you
are able to segment / split the text into space-separated words yourself
before indexing and querying.
Set this parameter to tre to do the same
type: boolean
enable_overrides:
description: >
If you have some overrides defined but want to disable all of them during
query time, you can do that by setting this parameter to false
type: boolean
prioritize_exact_match:
description: >
Set this parameter to true to ensure that an exact match is ranked above
the others
type: boolean
responses:
responses:
200:
200:
description: Search results
description: Search results
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/SearchResult"
$ref: "#/components/schemas/SearchResult"
400:
400:
description: Bad request, see error message for details
description: Bad request, see error message for details
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/ApiResponse"
$ref: "#/components/schemas/ApiResponse"
404:
404:
description: The collection or field was not found
description: The collection or field was not found
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/ApiResponse"
$ref: "#/components/schemas/ApiResponse"
/collections/{collectionName}/overrides:
/collections/{collectionName}/overrides:
get:
get:
tags:
tags:
- documents
- documents
- promote
- promote
summary: List all collection overrides
summary: List all collection overrides
operationId: getSearchOverrides
operationId: getSearchOverrides
parameters:
parameters:
- name: collectionName
- name: collectionName
in: path
in: path
description: The name of the collection
description: The name of the collection
required: true
required: true
schema:
schema:
type: string
type: string
responses:
responses:
200:
200:
description: List of all search overrides
description: List of all search overrides
content:
content:
application/json:
applictrueation/json:
schema:
schema:
$ref: "#/components/schemas/SearchOverridesResponse"
$ref: "#/components/schemas/SearchOverridesResponse"
/collections/{collectionName}/overrides/{overrideId}:
/collections/{collectionName}/overrides/{overrideId}:
get:
get:
tags:
tags:
- documents
- documents
- override
- override
summary: Retrieve a single search override
summary: Retrieve a single search override
description: Retrieve the details of a search override, given its id.
description: Retrieve the details of a search override, given its id.
operationId: getSearchOverride
operationId: getSearchOverride
parameters:
parameters:
- name: collectionName
- name: collectionName
in: path
in: path
description: The name of the collection
description: The name of the collection
required: true
required: true
schema:
schema:
type: string
type: string
- name: overrideId
- name: overrideId
in: path
in: path
description: The id of the search override
description: The id of the search override
required: true
required: true
schema:
schema:
type: string
type: string
responses:
responses:
200:
200:
description: Search override fetched
description: Search override fetched
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/SearchOverride"
$ref: "#/components/schemas/SearchOverride"
put:
put:
tags:
tags:
- documents
- documents
- promote
- promote
summary: Create or update an override to promote certain documents over others
summary: Create or update an override to promote certain documents over others
description:
description:
Create or update an override to promote certain documents over others.
Create or update an override to promote certain documents over others.
Using overrides, you can include or exclude specific documents for a given query.
Using overrides, you can include or exclude specific documents for a given query.
operationId: upsertSearchOverride
operationId: upsertSearchOverride
parameters:
parameters:
- name: collectionName
- name: collectionName
in: path
in: path
description: The name of the collection
description: The name of the collection
required: true
required: true
schema:
schema:
type: string
type: string
- name: overrideId
- name: overrideId
in: path
in: path
description: The ID of the search override to create/update
description: The ID of the search override to create/update
required: true
required: true
schema:
schema:
type: string
type: string
requestBody:
requestBody:
description: The search override object to be created/updated
description: The search override object to be created/updated
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/SearchOverrideSchema"
$ref: "#/components/schemas/SearchOverrideSchema"
required: true
required: true
responses:
responses:
200:
200:
description: Created/updated search override
description: Created/updated search override
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/SearchOverride"
$ref: "#/components/schemas/SearchOverride"
delete:
delete:
tags:
tags:
- documents
- documents
- promote
- promote
summary: Delete an override associated with a collection
summary: Delete an override associated with a collection
operationId: deleteSearchOverride
operationId: deleteSearchOverride
parameters:
parameters:
- name: collectionName
- name: collectionName
in: path
in: path
description: The name of the collection
description: The name of the collection
required: true
required: true
schema:
schema:
type: string
type: string
- name: overrideId
- name: overrideId
in: path
in: path
description: The ID of the search override to delete
description: The ID of the search override to delete
required: true
required: true
schema:
schema:
type: string
type: string
responses:
responses:
200:
200:
description: The ID of the deleted search override
description: The ID of the deleted search override
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/SearchOverride"
$ref: "#/components/schemas/SearchOverride"
/collections/{collectionName}/synonyms:
/collections/{collectionName}/synonyms:
get:
get:
tags:
tags:
- documents
- documents
summary: List all collection synonyms
summary: List all collection synonyms
operationId: getSearchSynonyms
operationId: getSearchSynonyms
parameters:
parameters:
- name: collectionName
- name: collectionName
in: path
in: path
description: The name of the collection
description: The name of the collection
required: true
required: true
schema:
schema:
type: string
type: string
responses:
responses:
200:
200:
description: List of all search synonyms
description: List of all search synonyms
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/SearchSynonymsResponse"
$ref: "#/components/schemas/SearchSynonymsResponse"
/collections/{collectionName}/synonyms/{synonymId}:
/collections/{collectionName}/synonyms/{synonymId}:
get:
get:
tags:
tags:
- documents
- documents
summary: Retrieve a single search synonym
summary: Retrieve a single search synonym
description: Retrieve the details of a search synonym, given its id.
description: Retrieve the details of a search synonym, given its id.
operationId: getSearchSynonym
operationId: getSearchSynonym
parameters:
parameters:
- name: collectionName
- name: collectionName
in: path
in: path
description: The name of the collection
description: The name of the collection
required: true
required: true
schema:
schema:
type: string
type: string
- name: synonymId
- name: synonymId
in: path
in: path
description: The id of the search synonym
description: The id of the search synonym
required: true
required: true
schema:
schema:
type: string
type: string
responses:
responses:
200:
200:
description: Search synonym fetched
description: Search synonym fetched
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/SearchSynonym"
$ref: "#/components/schemas/SearchSynonym"
put:
put:
tags:
tags:
- documents
- documents
summary: Create or update a synonym
summary: Create or update a synonym
description: Create or update a synonym to define search terms that should be considered equivalent.
description: Create or update a synonym to define search terms that should be considered equivalent.
operationId: upsertSearchSynonym
operationId: upsertSearchSynonym
parameters:
parameters:
- name: collectionName
- name: collectionName
in: path
in: path
description: The name of the collection
description: The name of the collection
required: true
required: true
schema:
schema:
type: string
type: string
- name: synonymId
- name: synonymId
in: path
in: path
description: The ID of the search synonym to create/update
description: The ID of the search synonym to create/update
required: true
required: true
schema:
schema:
type: string
type: string
requestBody:
requestBody:
description: The search synonym object to be created/updated
description: The search synonym object to be created/updated
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/SearchSynonymSchema"
$ref: "#/components/schemas/SearchSynonymSchema"
required: true
required: true
responses:
responses:
200:
200:
description: Created/updated search synonym
description: Created/updated search synonym
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/SearchSynonym"
$ref: "#/components/schemas/SearchSynonym"
delete:
delete:
tags:
tags:
- documents
- documents
summary: Delete a synonym associated with a collection
summary: Delete a synonym associated with a collection
operationId: deleteSearchSynonym
operationId: deleteSearchSynonym
parameters:
parameters:
- name: collectionName
- name: collectionName
in: path
in: path
description: The name of the collection
description: The name of the collection
required: true
required: true
schema:
schema:
type: string
type: string
- name: synonymId
- name: synonymId
in: path
in: path
description: The ID of the search synonym to delete
description: The ID of the search synonym to delete
required: true
required: true
schema:
schema:
type: string
type: string
responses:
responses:
200:
200:
description: The ID of the deleted search synonym
description: The ID of the deleted search synonym
content:
content:
application/json:
application/json:
schema:
schema:
$ref: "#/components/schemas/SearchSynonym"
$ref: "#/components/schemas/SearchSynonym"
/collections/{collectionName}/documents/export:
/collections/{collectionName}/documents/e
get:
tags:
- documents
summary: Export all documents in a collection
description: Export all documents in a collection in JSON lines format.
operationId: exportDocuments
parameters:
- name: collectionName
in: path
description: The name of the collection
required: true
schema:
type: string
responses:
200:
description: Exports all the