Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 178 additions & 5 deletions open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.1.0
info:
title: Meilisearch Core API
description: 'Search documents, configure and manage the Meilisearch engine.'
version: 0.26.0
version: 0.27.0
contact:
name: Meilisearch
email: [email protected]
Expand Down Expand Up @@ -405,6 +405,42 @@ components:
- exactness
- 'release_date:asc'
examples: []
typoTolerance:
type: object
description: Customize typo tolerance feature.
properties:
enabled:
description: Enable the typo tolerance feature.
type: boolean
default: true
nullable: false
disableOnAttributes:
description: Disable the typo tolerance feature on the specified attributes.
type: array
items:
type: string
default: []
nullable: false
disableOnWords:
description: Disable the typo tolerance feature for a set of query terms given for a search query.
type: array
items:
type: string
default: []
nullable: false
minWordSizeForTypos:
type: object
properties:
oneTypo:
description: Customize the minimum size for a word to tolerate 1 typo.
type: integer
default: 5
nullable: false
twoTypos:
description: Customize the minimum size for a word to tolerate 2 typos.
type: integer
default: 9
nullable: false
filterableAttributes:
type: array
description: |
Expand Down Expand Up @@ -458,6 +494,8 @@ components:
$ref: '#/components/schemas/searchableAttributes'
displayedAttributes:
$ref: '#/components/schemas/displayedAttributes'
typoTolerance:
$ref: '#/components/schemas/typoTolerance'
required:
- synonyms
- stopWords
Expand All @@ -466,6 +504,7 @@ components:
- distinctAttribute
- searchableAttributes
- displayedAttributes
- typoTolerance
stats:
type: object
additionalProperties: false
Expand Down Expand Up @@ -681,6 +720,22 @@ components:
default:
- ''
example: 'title,description'
highlightPreTag:
name: highlightPreTag
in: query
required: false
description: Specify the tag to put before the highlighted query terms.
schema:
type: string
default: '<em>'
highlightPostTag:
name: highlightPostTag
in: query
required: false
description: Specify the tag to put after the highlighted query terms.
schema:
type: string
default: '</em>'
attributesToCrop:
name: attributesToCrop
in: query
Expand All @@ -689,15 +744,23 @@ components:
type: string
example: 'overview:10'
description: Comma-separated list of attributes whose values have to be cropped. Cropped attributes are returned in `_formatted` response object.
cropMarker:
name: cropMarker
in: query
description: Sets the crop marker to apply before and/or after cropped part selected within an attribute defined in `attributesToCrop` parameter.
required: false
schema:
type: string
default: '…'
cropLength:
name: cropLength
in: query
required: false
schema:
type: integer
example: 5
default: 200
description: Length used to crop field values.
default: 10
description: Sets the total number of words to keep around the matched part of an attribute specified in the `attributesToCrop` parameter.
facetsDistribution:
name: facetsDistribution
in: query
Expand Down Expand Up @@ -1392,7 +1455,10 @@ paths:
- $ref: '#/components/parameters/q'
- $ref: '#/components/parameters/attributesToRetrieve'
- $ref: '#/components/parameters/attributesToHighlight'
- $ref: '#/components/parameters/highlightPreTag'
- $ref: '#/components/parameters/highlightPostTag'
- $ref: '#/components/parameters/attributesToCrop'
- $ref: '#/components/parameters/cropMarker'
- $ref: '#/components/parameters/cropLength'
- $ref: '#/components/parameters/facetsDistribution'
- $ref: '#/components/parameters/filter'
Expand Down Expand Up @@ -1476,17 +1542,31 @@ paths:
type: string
example: '["title", "overview"]'
default: '[]'
highlightPreTag:
type: string
description: Specify the tag to put before the highlighted query terms.
example: '<mark>'
default: '<em>'
highlightPostTag:
type: string
description: Specify the tag to put after the highlighted query terms.
example: '</mark>'
default: '</em>'
attributesToCrop:
type: array
description: Array of attributes whose values have to be cropped. Cropped attributes are returned in `_formatted` response object.
items:
type: string
example: '["overview", "author"]'
default: '[]'
cropMarker:
type: string
description: Sets the crop marker to apply before and/or after cropped part selected within an attribute defined in `attributesToCrop` parameter.
default: '…'
cropLength:
type: number
description: Length used to crop field values.
default: 200
description: Sets the total number of **words** to keep for the cropped part of an attribute specified in the `attributesToCrop` parameter.
default: 10
matches:
type: boolean
description: Defines whether an `_matchesInfo` object that contains information about the matches should be returned or not.
Expand Down Expand Up @@ -1607,6 +1687,8 @@ paths:
$ref: '#/components/schemas/filterableAttributes'
sortableAttributes:
$ref: '#/components/schemas/sortableAttributes'
typoTolerance:
$ref: '#/components/schemas/typoTolerance'
required:
- rankingRules
- distinctAttribute
Expand All @@ -1616,6 +1698,7 @@ paths:
- synonyms
- filterableAttributes
- sortableAttributes
- typoTolerance
examples:
Example:
value:
Expand Down Expand Up @@ -1657,6 +1740,16 @@ paths:
- price
- author
- title
typoTolerance:
enabled: true
disableOnAttributes:
- author
- price
disableOnWords:
- Tolkien
minWordSizeForTypos:
oneTypo: 4
twoTypos: 8
'401':
$ref: '#/components/responses/401'
'404':
Expand Down Expand Up @@ -1700,6 +1793,8 @@ paths:
$ref: '#/components/schemas/filterableAttributes'
sortableAttributes:
$ref: '#/components/schemas/sortableAttributes'
typoTolerance:
$ref: '#/components/schemas/typoTolerance'
examples:
Example:
value:
Expand Down Expand Up @@ -1736,6 +1831,16 @@ paths:
- release_date
filterableAttributes: []
sortableAttributes: null
typoTolerance:
enabled: false
disableOnAttributes:
- title
- author
disableOnWords:
- Tolkien
minWordSizeForTypos:
oneTypo: 4
twoTypos: 8
responses:
'202':
$ref: '#/components/responses/202'
Expand Down Expand Up @@ -2054,6 +2159,74 @@ paths:
description: Not Found
parameters:
- $ref: '#/components/parameters/indexUid'
'/indexes/{indexUid}/settings/typo-tolerance':
get:
operationId: indexes.settings.typoTolerance.get
summary: Get typo tolerance configuration
description: |
Get the typo tolerance configuration of an index.
tags:
- Settings
security:
- apiKey: []
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/typoTolerance'
'401':
$ref: '#/components/responses/401'
'404':
description: Not Found
post:
operationId: indexes.settings.typoTolerance.update
summary: Update typo tolerance settings
description: |
Update the typo tolerance configuration of an index.

> info
> If the provided index does not exist, it will be created.
tags:
- Settings
security:
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/typoTolerance'
examples: {}
description: ''
responses:
'202':
$ref: '#/components/responses/202'
'401':
$ref: '#/components/responses/401'
'404':
description: Not Found
parameters:
- $ref: '#/components/parameters/Content-Type'
delete:
operationId: indexes.settings.typoTolerance.reset
summary: Reset typo tolerance settings to the default configuration
description: |
Reset the typo tolerance settings of an index to its default configuration.
tags:
- Settings
security:
- apiKey: []
responses:
'202':
$ref: '#/components/responses/202'
'401':
$ref: '#/components/responses/401'
'404':
description: Not Found
parameters:
- $ref: '#/components/parameters/indexUid'
'/indexes/{indexUid}/settings/filterable-attributes':
get:
operationId: indexes.settings.filterableAttributes.get
Expand Down
22 changes: 6 additions & 16 deletions text/0000-specification-template.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
- Title:
- Start Date:
- Specification PR:
- MeiliSearch Tracking-issues:

> ❗️ The MeiliSearch Tracking-issues field is edited by delivery teams for listing any related issues that need to be done to fully implement this specification.

# Title

## 1. Functional Specification
## 1. Summary

## 2. Movtivation

### I. Summary
### II. Motivation
### III. Additional Materials
### IV. Explanation
### V. Impact on Documentation
### VI. Impact on SDKs
## 3. Functional Specification

## 2. Technical Aspects
## 4. Technical Details

## 3. Future Possibilities
## 5. Future Possibilities
Loading