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
Show all changes
22 commits
Select commit Hold shift + click to select a range
72d5114
Bump open-api.yml to v0.28
gmourier Mar 30, 2022
a1ceb5f
Telemetry - Add `x-meilisearch-client` query parameter (#145)
gmourier May 16, 2022
f667b57
GeoSearch — Support string type for `_geo` `lat` and `lng` fields (#83)
gmourier Oct 15, 2021
e36c626
Tasks API - Rename `uid` to `taskUid` in the `202 - Accepted` Summari…
gmourier May 17, 2022
1407c3e
Tasks API - Seek/Keyset based pagination (#115)
gmourier Jul 7, 2022
f2ba7e2
Tasks API - Filter tasks list by `type`/`status`/`indexUid` (#116)
gmourier Jul 7, 2022
f01752e
Dumps API - Make dump creation an asynchronous task (#139)
gmourier Jul 7, 2022
65e7ace
Search API - Remove/Rename confusing fields (#135)
gmourier Jul 7, 2022
bba69d4
API Guideline - Return list of API resources under a `results` array …
gmourier Jul 7, 2022
7863ed3
Remove name field (#140)
gmourier Jul 7, 2022
dec7cc4
Documents API - `displayedAttributes` should not impact the documents…
gmourier Jul 7, 2022
5a7e688
API Keys - Determinist API Keys + Security changes (#148)
gmourier Jul 7, 2022
80d5910
Geosearch - Enhance lat/lng format error messages (#149)
irevoire Jul 7, 2022
5413602
Introduces HTTP Verbs changesto be compliant regarding a Rest API (#152)
gmourier Jul 7, 2022
20a3b95
Telemetry - Replace `x-meilisearch-client` query parameter by `X-Meil…
gmourier Jul 7, 2022
87ef707
fix typo (#151)
gmourier Jul 7, 2022
240e81f
Mention telemetry.meilisearch.com (#153)
gmourier Jul 7, 2022
c7506e7
update ranking rules error message (#154)
MarinPostma Jul 7, 2022
a795050
Misc — Update dump versions compatibility table (#156)
curquiza Jul 7, 2022
539cc6c
Settings API - Customize the hard limits for `pagination` and `faceti…
gmourier Jul 7, 2022
17a81c0
Add dumpCreation task type to OpenAPI.yml
gmourier Jul 7, 2022
9ba67d5
Tasks filtering params to be in query instead of path on OpenAPI spec
gmourier Jul 7, 2022
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
847 changes: 504 additions & 343 deletions open-api.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion text/0000-specification-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 1. Summary

## 2. Movtivation
## 2. Motivation

## 3. Functional Specification

Expand Down
67 changes: 48 additions & 19 deletions text/0034-telemetry-policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ The collected data is sent to [Segment](https://segment.com/). Segment is a plat

[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.


----

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

----

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

----

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

---

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

---

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

---

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


## `TypoTolerance Updated`

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

## `Dump Created`
## `Pagination Updated`

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

## `Tasks Seen`
## `Faceting Updated`

| Property name | Description | Example |
|---------------|-------------|---------|
| faceting.max_values_per_facet | The defined value for `maxValuesPerFacet` property | `100` |

## `Dump Created`

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

## `Index Tasks Seen`
## `Tasks Seen`

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

---

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

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.

#### Identifying MeiliSearch installation
##### `X-Meilisearch-Client` Header

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.

If the `X-Meilisearch-Client` is encountered, it overrides the presence of the `User-Agent` header.

#### Telemetry Endpoint

Telemetric data are sent to the domain `telemetry.meilisearch.com` which then redirects it to Segment.

This transit domain allows us to change the telemetry collection solution in the future without impacting older versions of Meilisearch.

##### Identifying MeiliSearch installation

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

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

#### Segment Identify Call
##### Segment Identify Call

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.

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.

#### Segment Track Call
##### Segment Track Call

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

#### Batching
##### Batching

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.

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

#### Logging
##### Logging

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.

Expand Down
31 changes: 5 additions & 26 deletions text/0059-geo-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ According to our user feedback, the lack of a geosearch feature is mentioned as

- Name: `_geo`
- Type: Object
- Format: `{lat:float, lng:float}`
- Format: `{lat:number|string, lng:number|string}`
- Not required

> 💡 if `_geo` is found in the document payload, `lat` and `lng` are required.
> 💡 `lat` and `lng` must be of float value.
> 💡 `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.

##### **CSV Format**

Expand Down Expand Up @@ -101,8 +102,8 @@ csv format example
"brand": "F40 LM",
"brand": "Ferrari",
"_geo": {
"lat": 48.862725,
"lng": 2.287592
"lat": "48.862725",
"lng": "2.287592"
}
}
]
Expand All @@ -118,28 +119,6 @@ csv format example

- 🔴 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.

##### Errors Definition

## invalid_geo_field

### Context

This error occurs when the `_geo` field of a document payload is not valid.

### Error Definition

```json
{
"message": "The document with the id: `:documentId` contains an invalid _geo field: :syntaxErrorHelper.",
"code": "invalid_geo_field",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#invalid_geo_field"
}
```

- The `:documentId` is inferred when the message is generated.
- The `:syntaxErrorHelper` is inferred when the message is generated.

---

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

```json
"message": ":rankingRule ranking rule is invalid. Valid ranking rules are Words, Typo, Sort, Proximity, Attribute, Exactness and custom ranking rules."
"message": ":rankingRule ranking rule is invalid. Valid ranking rules are words, typo, sort, proximity, attribute, exactness and custom ranking rules."
"code": "invalid_ranking_rule"
"type": "invalid_request"
"link": "https://docs.meilisearch.com/errors#invalid_ranking_rule"
Expand Down
Loading