Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit 937e8eb

Browse files
gmourierbrunoocasalibidoubiwaKerollmopsdichotommy
authored
Release v0.28.0 (#137)
* Bump open-api.yml to v0.28 * Telemetry - Add `x-meilisearch-client` query parameter (#145) * Introduce the x-meilisearch-client query parameter * Update text/0034-telemetry-policies.md Co-authored-by: Bruno Casali <[email protected]> * Update text/0034-telemetry-policies.md Co-authored-by: Bruno Casali <[email protected]> Co-authored-by: Bruno Casali <[email protected]> * GeoSearch — Support string type for `_geo` `lat` and `lng` fields (#83) * Update specification to support string type for _geo lat and lng fields * mention types mixing for _geo object * Tasks API - Rename `uid` to `taskUid` in the `202 - Accepted` Summarized Task Response (#144) * Rename 202 uid to taskUid * Update text/0060-tasks-api.md Co-authored-by: cvermand <[email protected]> Co-authored-by: cvermand <[email protected]> * Tasks API - Seek/Keyset based pagination (#115) * Move cursor based pagination spec to tasks API spec * remove pagination as a future capability * Clarify boundaries for limit query parameter * Update OpenApi specification * Remove limit field boundaries * Apply suggestions from code review Co-authored-by: Clément Renault <[email protected]> * Update open-api.yml and removes cursor term mentions * Update text/0060-tasks-api.md Co-authored-by: Tommy <[email protected]> * Remove route mention in seek-keyset pagination section Co-authored-by: Clément Renault <[email protected]> Co-authored-by: Tommy <[email protected]> * Tasks API - Filter tasks list by `type`/`status`/`indexUid` (#116) * move filtering tasks by status/type parameter to task api spec * Update specification * Add details about case-sensitivy + rework error message * Introducing naming changes plus make the specification a source of truth instead of a changelog * Remove a future possibility being introduced * misc - replace createIndex to the right type and add the missing type field to the 202 Response resource * Dumps API - Make dump creation an asynchronous task (#139) * wip * Make a dump creation a visible asynchronous task * Add precisions * Update open-api.yml * Add ommited type field for summarized task response * Add future possibilities * Apply suggestions from code review Co-authored-by: cvermand <[email protected]> * Precise that indexUid can be null * Precise priorization of dumpCreation task over other task types * Keep taskUid for 202 response * remove dumps.get API key action Co-authored-by: cvermand <[email protected]> * Search API - Remove/Rename confusing fields (#135) * Rename nbHits, remove exhaustive* boolean fields * Rename approximativeNbHits to estimatedTotalHits * Update open-api.yaml * Apply naming changes for facet distribution and showing matches position * Add a telemetry for facet distribution usage * API Guideline - Return list of API resources under a `results` array (#138) * Place list of documents under a results array on /documents * Add results array for indexes object list * Add the future of indexes pagination * Update open-api.yml * Fix typo * Apply suggestions from code review Co-authored-by: cvermand <[email protected]> * Add offset/limit pagination for indexes and API keys * Try to add multipe refs to a response object Co-authored-by: cvermand <[email protected]> * Remove name field (#140) * Documents API - `displayedAttributes` should not impact the documents API / Rename `attributesToRetrieve` to `fields` (#143) * Specifies that displayedAttributes setting does not impact the GET documents endpoint * Rename attributeToRetrieve to fields on /documents * Add a future possibily to rejectt a field from a document in the given response * Precise behavior details about fields query parameter * Add fields query parameter on GET /indexes/{index}/documents/{docId} * API Keys - Determinist API Keys + Security changes (#148) * Add an uid to make API Keys determinists, plus add a non-unique human readable name field to ease reading information * Describe errors for uid and name fields * Apply suggestions from code review Co-authored-by: Bruno Casali <[email protected]> * misc: add precisions * Reorganize route descriptions * Update error_code when API Key already exists for a given uid * Apply suggestions from code review Co-authored-by: Many the fish <[email protected]> * Add new keys actions, remove master-key changes, introduce a new error for immutable field and update tenant token * Update open-api spec * Update immutable_field error message * Apply suggestions from code review Co-authored-by: Many the fish <[email protected]> * Mention that the Default Admin API Key can manage keys * Specify that the JWT Tenant Token must be enrypted with the API Key value * Update the spec regarding the description of the Admin API Key to be up-to-date * Add uid_or_key url param to update and delete a key * Update text/0085-api-keys.md Co-authored-by: Many the fish <[email protected]> * Update text/0085-api-keys.md Co-authored-by: Many the fish <[email protected]> Co-authored-by: Bruno Casali <[email protected]> Co-authored-by: Many the fish <[email protected]> Co-authored-by: Kerollmops <[email protected]> * Geosearch - Enhance lat/lng format error messages (#149) * Update the geosearch error message * misc: organiser error message in the right specification Co-authored-by: Guillaume Mourier <[email protected]> * Introduces HTTP Verbs changesto be compliant regarding a Rest API (#152) * Telemetry - Replace `x-meilisearch-client` query parameter by `X-Meilisearch-Client` header (#150) * Removes x-meilisearch-client, replace it by a header * Remove capslock * fix typo (#151) * Mention telemetry.meilisearch.com (#153) * update ranking rules error message (#154) * Misc — Update dump versions compatibility table (#156) * Update dump table * Update text/0105-dumps-api.md * Settings API - Customize the hard limits for `pagination` and `faceting` (#157) * Introduces specification files * Update files name * branch telemetry * Update open-api.yml * Update text/0034-telemetry-policies.md Co-authored-by: Clément Renault <[email protected]> * update open-api.yml * Update text/157-faceting-setting-api.md Co-authored-by: Clément Renault <[email protected]> * Rename limitedTo to maxTotalHits * Specify order of returned facet Co-authored-by: Clément Renault <[email protected]> * Add dumpCreation task type to OpenAPI.yml * Tasks filtering params to be in query instead of path on OpenAPI spec Co-authored-by: Bruno Casali <[email protected]> Co-authored-by: cvermand <[email protected]> Co-authored-by: Clément Renault <[email protected]> Co-authored-by: Tommy <[email protected]> Co-authored-by: Many the fish <[email protected]> Co-authored-by: Kerollmops <[email protected]> Co-authored-by: Tamo <[email protected]> Co-authored-by: ad hoc <[email protected]> Co-authored-by: Clémentine Urquizar - curqui <[email protected]>
1 parent b536fb7 commit 937e8eb

24 files changed

+1898
-1182
lines changed

open-api.yaml

Lines changed: 504 additions & 343 deletions
Large diffs are not rendered by default.

text/0000-specification-template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 1. Summary
44

5-
## 2. Movtivation
5+
## 2. Motivation
66

77
## 3. Functional Specification
88

text/0034-telemetry-policies.md

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ The collected data is sent to [Segment](https://segment.com/). Segment is a plat
3535

3636
[Amplitude](https://amplitude.com/) is a tool for graphing and highlighting collected data. Segment feeds Amplitude so that we can build visualizations according to our needs.
3737

38-
3938
----
4039

4140
#### Events table
@@ -55,9 +54,11 @@ The collected data is sent to [Segment](https://segment.com/). Segment is a plat
5554
| FilterableAttributes Updated | Occurs when filterable attributes are updated via `POST` - `/indexes/:indexUid/settings/filterable-attributes`. |
5655
| SortableAttributes Updated | Occurs when sortable attributes are updated via `POST` - `/indexes/:indexUid/settings/sortable-attributes`. |
5756
| TypoTolerance Updated | Occurs when typo tolerance settings are updated via `POST` - `/indexes/:indexUid/settings/typo-tolerance`. |
57+
| Pagination Updated | Occurs when pagination settings are updated via `PATCH``/indexes/:indexUid/settings/pagination`. |
58+
| Faceting Updated | Occurs when faceting settings are updated via `PATCH``/indexes/:indexUid/settings/faceting`. |
5859
| Dump Created | Occurs when a dump is created via `POST` - `/dumps`. |
5960
| Tasks Seen | Occurs when tasks are fetched globally via `GET` - `/tasks`. |
60-
| Index Tasks Seen | Occurs when tasks are filtered by index via `GET` - `/indexes/:indexUid/tasks`. |
61+
6162
----
6263

6364
#### Summarized Metrics/Events table
@@ -113,7 +114,8 @@ The collected data is sent to [Segment](https://segment.com/). Segment is a plat
113114
| `formatting.highlight_post_tag` | `true` if `highlightPostTag` was used in this batch, otherwise `false` | false | `Documents Searched POST`, `Documents Searched GET` |
114115
| `formatting.crop_length` | `true` if `cropLength` was used in this batch, otherwise `false` | false | `Documents Searched POST`, `Documents Searched GET` |
115116
| `formatting.crop_marker` | `true` if `cropMarker` was used in this batch, otherwise `false` | false | `Documents Searched POST`, `Documents Searched GET` |
116-
| `formatting.matches` | `true` if `matches` was used in this batch, otherwise `false` | false | `Documents Searched POST`, `Documents Searched GET` |
117+
| `formatting.show_matches_position` | `true` if `showMatchesPosition` was used in this batch, otherwise `false` | false | `Documents Searched POST`, `Documents Searched GET` |
118+
| `facets` | `true` if `facets` was used in this batch, otherwise `false` | false | `Documents Searched POST`, `Documents Searched GET` |
117119
| `primary_key` | Value given for the `primaryKey` parameter if used, otherwise `null` | id | `Index Created`, `Index Updated`, `Documents Added`, `Documents Updated`|
118120
| `payload_type` | All `payload_type` encountered in this batch | ["application/json", "text/plain", "application/x-ndjson"] | `Documents Added`, `Documents Updated` |
119121
| `index_creation` | `true` if a document addition or update request triggered index creation in this batch, otherwise `false` | true | `Documents Added`, `Documents Updated` |
@@ -128,8 +130,12 @@ The collected data is sent to [Segment](https://segment.com/). Segment is a plat
128130
| `typo_tolerance.disable_on_words` | `true` if at least one value is defined | `false` | `Settings Updated`, `TypoTolerance Updated` |
129131
| `typo_tolerance.min_word_size_for_typos.one_typo` | The defined value for `minWordSizeForTypos.oneTypo` property | `5` | `Settings Updated`, `TypoTolerance Updated` |
130132
| `typo_tolerance.min_word_size_for_typos.two_typos`| The defined value for `minWordSizeForTypos.twoTypos` property | `9` | `Settings Updated`, `TypoTolerance Updated` |
131-
| `per_task_uid` | `true` if an uid is used to fetch a particular task resource, otherwise `false` | true | `Tasks Seen`, `Index Tasks Seen` |
132-
|
133+
| `pagination.max_total_hits` | The defined value for `pagination.maxTotalHits` property | `1000` | `Settings Updated`, `Pagination Updated` |
134+
| `faceting.max_values_per_facet` | The defined value for `faceting.maxValuesPerFacet` property | `100` | `Settings Updated`, `Faceting Updated` |
135+
| `per_task_uid` | `true` if an uid is used to fetch a particular task resource, otherwise `false` | true | `Tasks Seen` |
136+
| `filtered_by_index_uid` | `true` if `GET /tasks` endpoint is filered by `indexUid`, otherwise `false` | false | `Tasks Seen` |
137+
| `filtered_by_type` | `true` if `GET /tasks` endpoint is filered by `type`, otherwise `false` | false | `Tasks Seen` |
138+
| `filtered_by_status` | `true` if `GET /tasks` endpoint is filered by `status`, otherwise `false` | false | `Tasks Seen` |
133139

134140
----
135141

@@ -215,7 +221,8 @@ This property allows us to gather essential information to better understand on
215221
| formatting.highlight_post_tag | Does `highlightPostTag` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
216222
| formatting.crop_length | Does `cropLength` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
217223
| formatting.crop_marker | Does `cropMarker` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
218-
| formatting.matches | Does `matches` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
224+
| formatting.show_matches_position | Does `showMatchesPosition` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
225+
| facets | Does `facets` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
219226

220227
---
221228

@@ -242,7 +249,8 @@ This property allows us to gather essential information to better understand on
242249
| formatting.highlight_post_tag | Does `highlightPostTag` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
243250
| formatting.crop_length | Does `cropLength` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
244251
| formatting.crop_marker | Does `cropMarker` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
245-
| formatting.matches | Does `matches` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
252+
| formatting.show_matches_position | Does `showMatchesPosition` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
253+
| facets | Does `facets` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
246254

247255
---
248256

@@ -307,6 +315,8 @@ This property allows us to gather essential information to better understand on
307315
| typo_tolerance.disable_on_words | `true` if at least one value is defined for `disableOnWords` property. | `false` |
308316
| typo_tolerance.min_word_size_for_typos.one_typo | The defined value for `minWordSizeForTypos.oneTypo` property. | `5` |
309317
| typo_tolerance.min_word_size_for_typos.two_typos | The defined value for `minWordSizeForTypos.twoTypos` property. | `9` |
318+
| pagination.max_total_hits | The defined value for `pagination.maxTotalHits` property | `1000` |
319+
| faceting.max_values_per_facet | The defined value for `faceting.maxValuesPerFacet` property | `100` |
310320

311321
---
312322

@@ -344,36 +354,43 @@ This property allows us to gather essential information to better understand on
344354
| user_agent | Represents the user-agent encountered on this call. | `["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]` |
345355
| searchable_attributes.total | Number of searchable attributes. | `3` |
346356

347-
348357
## `TypoTolerance Updated`
349358

350359
| Property name | Description | Example |
351360
|---------------|-------------|---------|
352-
| typo_tolerance.enabled | Whether the typo tolerance is enable.d | `true` |
361+
| typo_tolerance.enabled | Whether the typo tolerance is enabled | `true` |
353362
| typo_tolerance.disable_on_attributes | `true` if at least one value is defined for `disableOnAttributes` property. | `false` |
354363
| typo_tolerance.disable_on_words | `true` if at least one value is defined for `disableOnWords` property. | `false` |
355364
| typo_tolerance.min_word_size_for_typos.one_typo | The defined value for `minWordSizeForTypos.oneTypo` property. | `5` |
356365
| typo_tolerance.min_word_size_for_typos.two_typos | The defined value for `minWordSizeForTypos.twoTypos` property. | `9` |
357366

358-
## `Dump Created`
367+
## `Pagination Updated`
359368

360369
| Property name | Description | Example |
361370
|---------------|-------------|---------|
362-
| user_agent | Represents the user-agent encountered on this call. | `["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]` |
371+
| pagination.max_total_hits | The defined value for `maxTotalHits` property | `1000` |
363372

364-
## `Tasks Seen`
373+
## `Faceting Updated`
374+
375+
| Property name | Description | Example |
376+
|---------------|-------------|---------|
377+
| faceting.max_values_per_facet | The defined value for `maxValuesPerFacet` property | `100` |
378+
379+
## `Dump Created`
365380

366381
| Property name | Description | Example |
367382
|---------------|-------------|---------|
368383
| user_agent | Represents the user-agent encountered on this call. | `["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]` |
369-
| per_task_uid | `true` if an uid is used to fetch a particular task resource, otherwise `false` | `true` |
370384

371-
## `Index Tasks Seen`
385+
## `Tasks Seen`
372386

373387
| Property name | Description | Example |
374388
|---------------|-------------|---------|
375389
| user_agent | Represents the user-agent encountered on this call. | `["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]` |
376390
| per_task_uid | `true` if an uid is used to fetch a particular task resource, otherwise `false` | `true` |
391+
| filtered_by_index_uid | `true` if `GET /tasks` endpoint is filered by `indexUid`, otherwise `false` | `false` |
392+
| filtered_by_type | `true` if `GET /tasks` endpoint is filered by `type`, otherwise `false` | `false` |
393+
| filtered_by_status | `true` if `GET /tasks` endpoint is filered by `status`, otherwise `false` | `false` |
377394

378395
---
379396

@@ -417,7 +434,19 @@ The `User-Agent` header is tracked on the events listed below. Our official SDKs
417434

418435
Each endpoint API tracked sends the `User-Agent` as a `user_agent` event property as an array. If several values are contained in the `User-Agent` header, they are split by the `;` character.
419436

420-
#### Identifying MeiliSearch installation
437+
##### `X-Meilisearch-Client` Header
438+
439+
Some browser engines prevent overloading the User-Agent header. To track the calls made by some clients concerned by this fact, e.g. the JavaScript SDK, it is possible to use the `X-Meilisearch-Client` custom header.
440+
441+
If the `X-Meilisearch-Client` is encountered, it overrides the presence of the `User-Agent` header.
442+
443+
#### Telemetry Endpoint
444+
445+
Telemetric data are sent to the domain `telemetry.meilisearch.com` which then redirects it to Segment.
446+
447+
This transit domain allows us to change the telemetry collection solution in the future without impacting older versions of Meilisearch.
448+
449+
##### Identifying MeiliSearch installation
421450

422451
To identify instances, we generate a unique identifier at first launch if analytics are not disabled.
423452

@@ -428,23 +457,23 @@ To identify instances, we generate a unique identifier at first launch if analyt
428457
|-----------|---------|------------|-------|
429458
|config_dir | %APPDATA% (C:\Users\%USERNAME%\AppData\Roaming) | $XDG_CONFIG_HOME (~/.config) | ~/Library/Application Support |
430459

431-
#### Segment Identify Call
460+
##### Segment Identify Call
432461

433462
The `identify` method of Segment permits identifying an instance by sending a unique identifier. It groups the information of a MeiliSearch binary such as `system`, `stats`, and general properties related below in this specification.
434463

435464
The segment identify call is only sent after the first hour if the instance is still running. At the first launch, MeiliSearch sends a `Launched` event on an instance ID equal to `total_launch` in order to avoid tracking instances usage for nothing when they could be shut down and never restarted.
436465

437-
#### Segment Track Call
466+
##### Segment Track Call
438467

439468
The `track` calls of Segment allow tracking the events passed on the instance.
440469

441-
#### Batching
470+
##### Batching
442471

443472
A batch is sent every hour or when it reaches the maximum size of `500Kb` to avoid sending analytics in real-time and preserve network exchanges.
444473

445474
This batch contains an identify payload and all tracked events that occurred during this hour.
446475

447-
#### Logging
476+
##### Logging
448477

449478
Errors occurring when sending metrics to Segment should be silent. In general, the impact of data collection should be minimized as much as possible concerning performance and be entirely transparent for the user during its use.
450479

text/0059-geo-search.md

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ According to our user feedback, the lack of a geosearch feature is mentioned as
4242

4343
- Name: `_geo`
4444
- Type: Object
45-
- Format: `{lat:float, lng:float}`
45+
- Format: `{lat:number|string, lng:number|string}`
4646
- Not required
4747

4848
> 💡 if `_geo` is found in the document payload, `lat` and `lng` are required.
4949
> 💡 `lat` and `lng` must be of float value.
50+
> 💡 `lat` and `lng` field type can be mixed. e.g. `lat` can be a string while `lng` is a number in the same `_geo` object.
5051
5152
##### **CSV Format**
5253

@@ -101,8 +102,8 @@ csv format example
101102
"brand": "F40 LM",
102103
"brand": "Ferrari",
103104
"_geo": {
104-
"lat": 48.862725,
105-
"lng": 2.287592
105+
"lat": "48.862725",
106+
"lng": "2.287592"
106107
}
107108
}
108109
]
@@ -118,28 +119,6 @@ csv format example
118119

119120
- 🔴 Giving a bad formed `_geo` that do not conform to the format causes the `update` payload to fail. A new `invalid_geo_field` error is given in the `update` object.
120121

121-
##### Errors Definition
122-
123-
## invalid_geo_field
124-
125-
### Context
126-
127-
This error occurs when the `_geo` field of a document payload is not valid.
128-
129-
### Error Definition
130-
131-
```json
132-
{
133-
"message": "The document with the id: `:documentId` contains an invalid _geo field: :syntaxErrorHelper.",
134-
"code": "invalid_geo_field",
135-
"type": "invalid_request",
136-
"link": "https://docs.meilisearch.com/errors#invalid_geo_field"
137-
}
138-
```
139-
140-
- The `:documentId` is inferred when the message is generated.
141-
- The `:syntaxErrorHelper` is inferred when the message is generated.
142-
143122
---
144123

145124
### **As an end-user, I want to filter documents within a geo radius.**
@@ -241,7 +220,7 @@ This error is raised asynchronously when the user tries to specify an invalid ra
241220
#### Error Definition
242221

243222
```json
244-
"message": ":rankingRule ranking rule is invalid. Valid ranking rules are Words, Typo, Sort, Proximity, Attribute, Exactness and custom ranking rules."
223+
"message": ":rankingRule ranking rule is invalid. Valid ranking rules are words, typo, sort, proximity, attribute, exactness and custom ranking rules."
245224
"code": "invalid_ranking_rule"
246225
"type": "invalid_request"
247226
"link": "https://docs.meilisearch.com/errors#invalid_ranking_rule"

0 commit comments

Comments
 (0)