diff --git a/openapi.yml b/openapi.yml index 10466b7..377e54c 100644 --- a/openapi.yml +++ b/openapi.yml @@ -35,11 +35,6 @@ tags: externalDocs: description: Find out more url: https://typesense.org/api/#index-document - - name: curation - description: Hand-curate search results based on conditional business rules - externalDocs: - description: Find out more - url: https://typesense.org/docs/0.23.0/api/#curation - name: analytics description: Typesense can aggregate search queries for both analytics purposes and for query suggestions. externalDocs: @@ -72,11 +67,16 @@ tags: externalDocs: description: Find out more url: https://typesense.org/docs/28.0/api/conversational-search-rag.html - - name: synonyms - description: Manage synonyms + - name: synonym_sets + description: Manage synonym sets + externalDocs: + description: Find out more + url: https://typesense.org/docs/28.0/api/synonym-sets.html + - name: curation_sets + description: Hand-curate search results based on conditional business rules externalDocs: description: Find out more - url: https://typesense.org/docs/28.0/api/synonyms.html + url: https://typesense.org/docs/28.0/api/synonym-sets.html - name: stemming description: Manage stemming dictionaries externalDocs: @@ -460,234 +460,7 @@ paths: application/json: schema: $ref: "#/components/schemas/ApiResponse" - /collections/{collectionName}/overrides: - get: - tags: - - documents - - curation - summary: List all collection overrides - operationId: getSearchOverrides - parameters: - - name: collectionName - in: path - description: The name of the collection - required: true - schema: - type: string - responses: - '200': - description: List of all search overrides - content: - application/json: - schema: - $ref: "#/components/schemas/SearchOverridesResponse" - /collections/{collectionName}/overrides/{overrideId}: - get: - tags: - - documents - - override - summary: Retrieve a single search override - description: Retrieve the details of a search override, given its id. - operationId: getSearchOverride - parameters: - - name: collectionName - in: path - description: The name of the collection - required: true - schema: - type: string - - name: overrideId - in: path - description: The id of the search override - required: true - schema: - type: string - responses: - '200': - description: Search override fetched - content: - application/json: - schema: - $ref: "#/components/schemas/SearchOverride" - put: - tags: - - documents - - curation - summary: Create or update an override to promote certain documents over others - description: - Create or update an override to promote certain documents over others. - Using overrides, you can include or exclude specific documents for a given query. - operationId: upsertSearchOverride - parameters: - - name: collectionName - in: path - description: The name of the collection - required: true - schema: - type: string - - name: overrideId - in: path - description: The ID of the search override to create/update - required: true - schema: - type: string - requestBody: - description: The search override object to be created/updated - content: - application/json: - schema: - $ref: "#/components/schemas/SearchOverrideSchema" - required: true - responses: - '200': - description: Created/updated search override - content: - application/json: - schema: - $ref: "#/components/schemas/SearchOverride" - '404': - description: Search override not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiResponse" - delete: - tags: - - documents - - curation - summary: Delete an override associated with a collection - operationId: deleteSearchOverride - parameters: - - name: collectionName - in: path - description: The name of the collection - required: true - schema: - type: string - - name: overrideId - in: path - description: The ID of the search override to delete - required: true - schema: - type: string - responses: - '200': - description: The ID of the deleted search override - content: - application/json: - schema: - $ref: "#/components/schemas/SearchOverrideDeleteResponse" - '404': - description: Search override not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiResponse" - - /synonym_sets: - get: - tags: - - synonyms - summary: List all synonym sets - description: Retrieve all synonym sets - operationId: retrieveSynonymSets - responses: - "200": - description: List of all synonym sets - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/SynonymSetSchema" - - /synonym_sets/{synonymSetName}: - get: - tags: - - synonyms - summary: Retrieve a synonym set - description: Retrieve a specific synonym set by its name - operationId: retrieveSynonymSet - parameters: - - name: synonymSetName - in: path - description: The name of the synonym set to retrieve - required: true - schema: - type: string - responses: - "200": - description: Synonym set fetched - content: - application/json: - schema: - $ref: "#/components/schemas/SynonymSetRetrieveSchema" - "404": - description: Synonym set not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiResponse" - put: - tags: - - synonyms - summary: Create or update a synonym set - description: Create or update a synonym set with the given name - operationId: upsertSynonymSet - parameters: - - name: synonymSetName - in: path - description: The name of the synonym set to create/update - required: true - schema: - type: string - requestBody: - description: The synonym set to be created/updated - content: - application/json: - schema: - $ref: "#/components/schemas/SynonymSetCreateSchema" - required: true - responses: - "200": - description: Synonym set successfully created/updated - content: - application/json: - schema: - $ref: "#/components/schemas/SynonymSetSchema" - "400": - description: Bad request, see error message for details - content: - application/json: - schema: - $ref: "#/components/schemas/ApiResponse" - delete: - tags: - - synonyms - summary: Delete a synonym set - description: Delete a specific synonym set by its name - operationId: deleteSynonymSet - parameters: - - name: synonymSetName - in: path - description: The name of the synonym set to delete - required: true - schema: - type: string - responses: - "200": - description: Synonym set successfully deleted - content: - application/json: - schema: - $ref: "#/components/schemas/SynonymSetDeleteSchema" - "404": - description: Synonym set not found - content: - application/json: - schema: - $ref: "#/components/schemas/ApiResponse" - + /collections/{collectionName}/documents/export: get: tags: @@ -814,7 +587,7 @@ paths: get: tags: - documents - summary: Retrieve a document + summary: Retreive a document description: Fetch an individual document from a collection by using its ID. operationId: getDocument parameters: @@ -954,7 +727,7 @@ paths: $ref: '#/components/schemas/ConversationModelCreateSchema' required: true responses: - '201': + '200': content: application/json: schema: @@ -1343,66 +1116,6 @@ 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" - /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" - /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 @@ -2093,65 +1806,529 @@ paths: description: Update an existing NL search model. operationId: updateNLSearchModel parameters: - - name: modelId + - name: modelId + in: path + description: The ID of the NL search model to update + required: true + schema: + type: string + requestBody: + description: The NL search model fields to update + content: + application/json: + schema: + $ref: '#/components/schemas/NLSearchModelUpdateSchema' + required: true + responses: + '200': + description: NL search model successfully updated + content: + application/json: + schema: + $ref: '#/components/schemas/NLSearchModelSchema' + '400': + description: Bad request, see error message for details + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '404': + description: NL search model not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + delete: + tags: + - nl_search_models + summary: Delete a NL search model + description: Delete a specific NL search model by its ID. + operationId: deleteNLSearchModel + parameters: + - name: modelId + in: path + description: The ID of the NL search model to delete + required: true + schema: + type: string + responses: + '200': + description: NL search model successfully deleted + content: + application/json: + schema: + $ref: '#/components/schemas/NLSearchModelDeleteSchema' + '404': + description: NL search model not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + + /synonym_sets: + get: + tags: + - synonym_sets + summary: List all synonym sets + description: Retrieve the list of all synonym sets. + operationId: getSynonymSets + responses: + '200': + description: List of synonym sets + content: + application/json: + schema: + $ref: '#/components/schemas/SynonymSetsListResponse' + + /synonym_sets/{name}: + get: + tags: + - synonym_sets + summary: Get a synonym set + description: Retrieve a specific synonym set by name. + operationId: getSynonymSet + parameters: + - in: path + name: name + required: true + schema: + type: string + responses: + '200': + description: Synonym set fetched + content: + application/json: + schema: + $ref: '#/components/schemas/SynonymSet' + '404': + description: Synonym set not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + put: + tags: + - synonym_sets + summary: Create or replace a synonym set + description: Create or replace a synonym set with the given name. + operationId: upsertSynonymSet + parameters: + - in: path + name: name + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SynonymSetUpsert' + responses: + '200': + description: Created/updated synonym set + content: + application/json: + schema: + $ref: '#/components/schemas/SynonymSet' + '400': + description: Bad request, see error message for details + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + delete: + tags: + - synonym_sets + summary: Delete a synonym set + description: Delete the specified synonym set. + operationId: deleteSynonymSet + parameters: + - in: path + name: name + required: true + schema: + type: string + responses: + '200': + description: Synonym set deleted + content: + application/json: + schema: + $ref: '#/components/schemas/SynonymSetDeleteResponse' + '404': + description: Synonym set not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + + /synonym_sets/{name}/items: + get: + tags: + - synonym_sets + summary: List synonym items in a set + operationId: listSynonymItems + parameters: + - name: name + in: path + required: true + schema: + type: string + - name: limit + in: query + schema: + type: integer + - name: offset + in: query + schema: + type: integer + responses: + '200': + description: List of synonym items + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/SynonymObject' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + + /synonym_sets/{name}/items/{id}: + get: + tags: + - synonym_sets + summary: Get synonym item + operationId: getSynonymItem + parameters: + - name: name + in: path + required: true + schema: + type: string + - name: id + in: path + required: true + schema: + type: string + responses: + '200': + description: Synonym item + content: + application/json: + schema: + $ref: '#/components/schemas/SynonymObject' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + put: + tags: + - synonym_sets + summary: Upsert synonym item + operationId: putSynonymItem + parameters: + - name: name + in: path + required: true + schema: + type: string + - name: id + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SynonymObject' + responses: + '200': + description: Synonym item upserted + content: + application/json: + schema: + $ref: '#/components/schemas/SynonymObject' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '404': + description: Synonym set not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + delete: + tags: + - synonym_sets + summary: Delete synonym item + operationId: deleteSynonymItem + parameters: + - name: name + in: path + required: true + schema: + type: string + - name: id + in: path + required: true + schema: + type: string + responses: + '200': + description: Synonym item deleted + content: + application/json: + schema: + $ref: '#/components/schemas/SynonymItemDeleteResponse' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + /curation_sets: + get: + tags: + - curation_sets + summary: List all curation sets + description: Retrieve the list of all curation sets. + operationId: getCurationSets + responses: + '200': + description: List of curation sets + content: + application/json: + schema: + $ref: '#/components/schemas/CurationSetsListResponse' + + /curation_sets/{name}: + get: + tags: + - curation_sets + summary: Get an curation set + description: Retrieve a specific curation set by name. + operationId: getCurationSet + parameters: + - name: name + in: path + required: true + schema: + type: string + responses: + '200': + description: Curation set + content: + application/json: + schema: + $ref: '#/components/schemas/CurationSet' + '404': + description: Curation set not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + put: + tags: + - curation_sets + summary: Upsert an curation set + operationId: putCurationSet + parameters: + - name: name + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CurationSetUpsert' + responses: + '200': + description: Curation set upserted + content: + application/json: + schema: + $ref: '#/components/schemas/CurationSet' + '400': + description: Bad request, see error message for details + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + delete: + tags: + - curation_sets + summary: Delete an curation set + operationId: deleteCurationSet + parameters: + - name: name + in: path + required: true + schema: + type: string + responses: + '200': + description: Curation set deleted + content: + application/json: + schema: + $ref: '#/components/schemas/CurationSetDeleteResponse' + '404': + description: Curation set not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + + /curation_sets/{name}/items: + get: + tags: + - curation_sets + summary: List curation items in a set + operationId: listCurationItems + parameters: + - name: name + in: path + required: true + schema: + type: string + - name: limit + in: query + schema: + type: integer + - name: offset + in: query + schema: + type: integer + responses: + '200': + description: List of curation items + content: + application/json: + schema: + $ref: '#/components/schemas/CurationSetListItemResponse' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + + /curation_sets/{name}/items/{id}: + get: + tags: + - curation_sets + summary: Get curation item + operationId: getCurationItem + parameters: + - name: name + in: path + required: true + schema: + type: string + - name: id + in: path + required: true + schema: + type: string + responses: + '200': + description: Curation item + content: + application/json: + schema: + $ref: '#/components/schemas/CurationObject' + '404': + description: Not found + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + put: + tags: + - curation_sets + summary: Upsert curation item + operationId: putCurationItem + parameters: + - name: name + in: path + required: true + schema: + type: string + - name: id in: path - description: The ID of the NL search model to update required: true schema: type: string requestBody: - description: The NL search model fields to update + required: true content: application/json: schema: - $ref: '#/components/schemas/NLSearchModelUpdateSchema' - required: true + $ref: '#/components/schemas/CurationObject' responses: '200': - description: NL search model successfully updated + description: Curation item upserted content: application/json: schema: - $ref: '#/components/schemas/NLSearchModelSchema' + $ref: '#/components/schemas/CurationObject' '400': - description: Bad request, see error message for details + description: Bad request content: application/json: schema: $ref: '#/components/schemas/ApiResponse' '404': - description: NL search model not found + description: Curation set not found content: application/json: schema: $ref: '#/components/schemas/ApiResponse' delete: tags: - - nl_search_models - summary: Delete a NL search model - description: Delete a specific NL search model by its ID. - operationId: deleteNLSearchModel + - curation_sets + summary: Delete curation item + operationId: deleteCurationItem parameters: - - name: modelId + - name: name + in: path + required: true + schema: + type: string + - name: id in: path - description: The ID of the NL search model to delete required: true schema: type: string responses: '200': - description: NL search model successfully deleted + description: Curation item deleted content: application/json: schema: - $ref: '#/components/schemas/NLSearchModelDeleteSchema' + $ref: '#/components/schemas/CurationItemDeleteResponse' '404': - description: NL search model not found + description: Not found content: application/json: schema: $ref: '#/components/schemas/ApiResponse' - components: schemas: CollectionSchema: @@ -2199,12 +2376,6 @@ components: minLength: 1 maxLength: 1 default: [] - synonym_sets: - type: array - description: List of synonym set names to associate with this collection - items: - type: string - example: "synonym_set_1" enable_nested_fields: type: boolean description: @@ -2229,6 +2400,18 @@ components: type: object description: > Optional details about the collection, e.g., when it was created, who created it etc. + synonym_sets: + type: array + items: + type: string + description: + List of synonym sets to be used for the collection. + curation_sets: + type: array + items: + type: string + description: + List of curation sets to be used for the collection. CollectionUpdateSchema: required: - fields @@ -2249,12 +2432,6 @@ components: facet: true items: $ref: "#/components/schemas/Field" - synonym_sets: - type: array - description: List of synonym set names to associate with this collection - items: - type: string - example: "synonym_set_1" metadata: type: object description: > @@ -2479,10 +2656,6 @@ components: description: Returned only for union query response. items: $ref: "#/components/schemas/SearchRequestParams" - metadata: - type: object - description: Custom JSON object that can be returned in the search response - additionalProperties: true SearchRequestParams: type: object required: @@ -2648,185 +2821,168 @@ components: items: type: object x-go-type: "interface{}" - SearchOverrideSchema: + SynonymObject: type: object required: - - rule + - id + - root + - synonyms properties: - rule: - $ref: "#/components/schemas/SearchOverrideRule" - includes: + id: { type: string } + root: { type: string } + synonyms: type: array - description: - List of document `id`s that should be included in the search results with their - corresponding `position`s. - items: - $ref: "#/components/schemas/SearchOverrideInclude" - excludes: + items: { type: string } + locale: { type: string } + symbols_to_index: + type: array + items: { type: string } + SynonymSetUpsert: + type: object + required: + - items + properties: + items: type: array - description: List of document `id`s that should be excluded from the search results. items: - $ref: "#/components/schemas/SearchOverrideExclude" - filter_by: - type: string - description: > - A filter by clause that is applied to any search query that matches the override rule. - remove_matched_tokens: - type: boolean - description: > - Indicates whether search query tokens that exist in the override's rule should be removed from the search query. - metadata: - type: object - description: > - Return a custom JSON object in the Search API response, when this rule is triggered. This can can be used to display a pre-defined message (eg: a promotion banner) on the front-end when a particular rule is triggered. - sort_by: - type: string - description: > - A sort by clause that is applied to any search query that matches the override rule. - replace_query: - type: string - description: > - Replaces the current search query with this value, when the search query matches the override rule. - filter_curated_hits: - type: boolean - description: > - When set to true, the filter conditions of the query is applied to the curated records as well. - Default: false. - effective_from_ts: - type: integer - description: > - A Unix timestamp that indicates the date/time from which the override will be active. You can use this to create override rules that start applying from a future point in time. - effective_to_ts: - type: integer - description: > - A Unix timestamp that indicates the date/time until which the override will be active. You can use this to create override rules that stop applying after a period of time. - stop_processing: - type: boolean - description: > - When set to true, override processing will stop at the first matching rule. When set to false override processing will continue and multiple override actions will be triggered in sequence. - Overrides are processed in the lexical sort order of their id field. - Default: true. - SearchOverride: - allOf: - - $ref: "#/components/schemas/SearchOverrideSchema" - - type: object - required: - - id - properties: - id: - type: string - readOnly: true - SearchOverrideDeleteResponse: + $ref: '#/components/schemas/SynonymObject' + SynonymSet: type: object required: - - id + - items properties: - id: - type: string - description: The id of the override that was deleted - SearchOverrideRule: + items: + type: array + items: + $ref: '#/components/schemas/SynonymObject' + SynonymSetsListEntry: type: object + required: + - name + - items properties: - tags: + name: { type: string } + items: type: array - description: List of tag values to associate with this override rule. items: - type: string - query: - type: string - description: Indicates what search queries should be overridden - match: - type: string - description: > - Indicates whether the match on the query term should be `exact` or `contains`. - If we want to match all queries that contained - the word `apple`, we will use the `contains` match instead. - enum: - - exact - - contains - filter_by: - type: string - description: > - Indicates that the override should apply when the filter_by parameter in a search query exactly matches the string specified here (including backticks, spaces, brackets, etc). - SearchOverrideInclude: + $ref: '#/components/schemas/SynonymObject' + SynonymSetsListResponse: + type: array + items: + $ref: '#/components/schemas/SynonymSetsListEntry' + SynonymItemDeleteResponse: type: object required: - - id - - position + - name + properties: + name: { type: string } + SynonymSetDeleteResponse: + type: object + required: + - name + properties: + name: { type: string } + CurationInclude: + type: object + required: [id, position] properties: id: type: string - description: document id that should be included position: type: integer - description: position number where document should be included in the search results - SearchOverrideExclude: + CurationExclude: type: object - required: - - id + required: [id] properties: id: type: string - description: document id that should be excluded from the search results. - SearchOverridesResponse: + CurationRule: type: object - required: - - overrides properties: - overrides: + query: + type: string + match: + type: string + enum: [exact, contains] + filter_by: + type: string + tags: type: array - x-go-type: "[]*SearchOverride" - items: - $ref: "#/components/schemas/SearchOverride" - SearchSynonymSchema: + items: { type: string } + CurationObject: type: object - required: - - synonyms + required: [id] properties: - root: - type: string - description: For 1-way synonyms, indicates the root word that words in the `synonyms` parameter map to. - synonyms: + id: { type: string } + rule: + $ref: '#/components/schemas/CurationRule' + includes: type: array - description: Array of words that should be considered as synonyms. items: - type: string - locale: + $ref: '#/components/schemas/CurationInclude' + excludes: + type: array + items: + $ref: '#/components/schemas/CurationExclude' + filter_by: type: string - description: Locale for the synonym, leave blank to use the standard tokenizer. - symbols_to_index: + sort_by: + type: string + replace_query: + type: string + remove_matched_tokens: + type: boolean + filter_curated_hits: + type: boolean + stop_processing: + type: boolean + metadata: + type: object + CurationSetUpsert: + type: object + required: [items] + properties: + items: type: array - description: By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is. items: - type: string - SearchSynonym: - allOf: - - $ref: "#/components/schemas/SearchSynonymSchema" - - type: object - required: - - id - properties: - id: - type: string - readOnly: true - SearchSynonymDeleteResponse: + $ref: '#/components/schemas/CurationObject' + CurationSet: type: object - required: - - id + required: [items] properties: - id: + name: type: string - description: The id of the synonym that was deleted - SearchSynonymsResponse: + items: + type: array + items: + $ref: '#/components/schemas/CurationObject' + CurationSetsListEntry: type: object - required: - - synonyms + required: [name, items] properties: - synonyms: + name: { type: string } + items: type: array - x-go-type: "[]*SearchSynonym" items: - $ref: "#/components/schemas/SearchSynonym" + $ref: '#/components/schemas/CurationObject' + CurationSetsListResponse: + type: array + items: + $ref: '#/components/schemas/CurationSetsListEntry' + CurationSetDeleteResponse: + type: object + required: [name] + properties: + name: { type: string } + CurationSetListItemResponse: + type: array + items: + $ref: '#/components/schemas/CurationObject' + CurationItemDeleteResponse: + type: object + required: [id] + properties: + id: { type: string } HealthStatus: type: object required: @@ -3005,7 +3161,7 @@ components: filter_by: description: - Filter conditions for refining your open api validator search results. Separate + Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. type: string example: "num_employees:>100 && country: [USA, UK]" @@ -3127,24 +3283,12 @@ components: type: boolean default: true - enable_analytics: - description: > - Flag for enabling/disabling analytics aggregation for specific search - queries (for e.g. those originating from a test script). - type: boolean - default: true - snippet_threshold: description: > Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 type: integer - synonym_sets: - type: string - description: List of synonym set names to associate with this search query - example: "synonym_set_1,synonym_set_2" - drop_tokens_threshold: description: > If the number of results found for a specific query is less than @@ -3168,7 +3312,7 @@ components: filter_curated_hits: type: boolean description: > - Whether the filter_by condition of the search query should be applicable to curated results (override definitions, pinned hits, hidden hits, etc.). Default: false + Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false enable_synonyms: type: boolean description: > @@ -3191,8 +3335,8 @@ components: 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 - on rules. Overrides are applied first, followed by `pinned_hits` and + You could also use the Curations feature to curation search results based + on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`. type: string @@ -3202,12 +3346,12 @@ components: 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 - on rules. Overrides are applied first, followed by `pinned_hits` and + You could also use the Curations feature to curation search results based + on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`. type: string - override_tags: + curation_tags: description: Comma separated list of tags to trigger the curations rules that match the tags. type: string @@ -3240,9 +3384,9 @@ components: the name of the existing Preset. type: string - enable_overrides: + ENABLE_CURATIONS: description: > - If you have some overrides defined but want to disable all of them during + If you have some curations defined but want to disable all of them during query time, you can do that by setting this parameter to false type: boolean default: false @@ -3545,19 +3689,11 @@ components: filter_curated_hits: type: boolean description: > - Whether the filter_by condition of the search query should be applicable to curated results (override definitions, pinned hits, hidden hits, etc.). Default: false + Whether the filter_by condition of the search query should be applicable to curated results (curation definitions, pinned hits, hidden hits, etc.). Default: false enable_synonyms: type: boolean description: > If you have some synonyms defined but want to disable all of them for a particular search query, set enable_synonyms to false. Default: true - - enable_analytics: - description: > - Flag for enabling/disabling analytics aggregation for specific search - queries (for e.g. those originating from a test script). - type: boolean - default: true - synonym_prefix: type: boolean description: > @@ -3576,8 +3712,8 @@ components: 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 - on rules. Overrides are applied first, followed by `pinned_hits` and + You could also use the Curations feature to curation search results based + on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`. type: string @@ -3587,12 +3723,12 @@ components: 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 - on rules. Overrides are applied first, followed by `pinned_hits` and + You could also use the Curations feature to curation search results based + on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`. type: string - override_tags: + curation_tags: description: Comma separated list of tags to trigger the curations rules that match the tags. type: string @@ -3618,9 +3754,9 @@ components: the name of the existing Preset. type: string - enable_overrides: + enable_curations: description: > - If you have some overrides defined but want to disable all of them during + If you have some curations defined but want to disable all of them during query time, you can do that by setting this parameter to false type: boolean default: false @@ -4056,11 +4192,11 @@ components: enum: [create, update, upsert, emplace] DropTokensMode: type: string - enum: [right_to_left, left_to_right, both_sides:3] + enum: [right_to_left, left_to_right, both_sides] 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 up to 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 upto 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: @@ -4245,79 +4381,8 @@ components: type: string description: ID of the deleted NL search model - SynonymItemSchema: - type: object - required: - - id - - synonyms - properties: - id: - type: string - description: Unique identifier for the synonym item - synonyms: - type: array - description: Array of words that should be considered as synonyms - items: - type: string - root: - type: string - description: For 1-way synonyms, indicates the root word that words in the synonyms parameter map to - locale: - type: string - description: Locale for the synonym, leave blank to use the standard tokenizer - symbols_to_index: - type: array - description: By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is - items: - type: string - - SynonymSetCreateSchema: - type: object - required: - - items - properties: - items: - type: array - description: Array of synonym items - items: - $ref: "#/components/schemas/SynonymItemSchema" - - SynonymSetSchema: - allOf: - - $ref: "#/components/schemas/SynonymSetCreateSchema" - - type: object - required: - - name - properties: - name: - type: string - description: Name of the synonym set - - SynonymSetsRetrieveSchema: - type: object - required: - - synonym_sets - properties: - synonym_sets: - type: array - description: Array of synonym sets - items: - $ref: "#/components/schemas/SynonymSetSchema" - - SynonymSetRetrieveSchema: - $ref: "#/components/schemas/SynonymSetCreateSchema" - - SynonymSetDeleteSchema: - type: object - required: - - name - properties: - name: - type: string - description: Name of the deleted synonym set - securitySchemes: api_key_header: type: apiKey name: X-TYPESENSE-API-KEY - in: header + in: header \ No newline at end of file