From b0bcd1da723510a6a1aa4b5285a988e3fbc76d4d Mon Sep 17 00:00:00 2001 From: Guillaume Mourier Date: Wed, 6 Apr 2022 15:49:50 +0200 Subject: [PATCH] Remove name field --- open-api.yaml | 7 ------- text/0132-indexes-api.md | 20 ++++---------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/open-api.yaml b/open-api.yaml index 8a6434950..b9697d65d 100644 --- a/open-api.yaml +++ b/open-api.yaml @@ -34,7 +34,6 @@ components: additionalProperties: false examples: - uid: movies - name: movies primaryKey: movie_id createdAt: '2019-11-20T09:40:33.711324Z' updatedAt: '2019-11-20T09:40:33.711324Z' @@ -45,9 +44,6 @@ components: type: string example: movies description: Unique identifier for the index - name: - type: string - description: Name of the index primaryKey: type: - string @@ -61,7 +57,6 @@ components: $ref: '#/components/schemas/timestamp' required: - uid - - name - createdAt - updatedAt document: @@ -1056,7 +1051,6 @@ paths: Example: value: - uid: movies - name: movies primaryKey: movie_id createdAt: '2019-11-20T09:40:33.711324Z' updatedAt: '2019-11-20T09:40:33.711324Z' @@ -1140,7 +1134,6 @@ paths: Example: value: uid: movies - name: movies primaryKey: movie_id createdAt: '2019-11-20T09:40:33.711324Z' updatedAt: '2019-11-20T09:40:33.711324Z' diff --git a/text/0132-indexes-api.md b/text/0132-indexes-api.md index 3420554f6..0b4074920 100644 --- a/text/0132-indexes-api.md +++ b/text/0132-indexes-api.md @@ -37,16 +37,7 @@ This field is mandatory when creating an index and cannot be changed afterwards. The field `uid` can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_). -#### 3.1.2. `name` - -- Type: string -- Required: false - -This field is automatically generated by the engine when creating an index and is equal to the value of `uid`. - -It is not possible to give a custom value to `name` when creating or updating an index. - -#### 3.1.3. `primaryKey` +#### 3.1.2. `primaryKey` - Type: string - Required: false @@ -62,7 +53,7 @@ Specifying this field tells the engine to use the document attribute specified i When the index is empty, it is possible to modify the `primaryKey`. -#### 3.1.4. `createdAt` +#### 3.1.3. `createdAt` - Type: string - Required: false @@ -73,7 +64,7 @@ Automatically generated by the engine at the creation of an index. Represented with the `RFC 3339` format. -#### 3.1.5. `updatedAt` +#### 3.1.4. `updatedAt` - Type: string - Required: false @@ -111,13 +102,10 @@ Fetch an index of a Meilisearch instance. | Field | Type | Required | |--------------------------|--------------------------|----------| | `uid` | string | true | -| `name` | string | true | | `primaryKey` | string / `null` | true | | `createdAt` | string | true | | `updatedAt` | string | true | -The `name` field has the same value as the `uid`. - ##### 3.2.2.2. Errors - 🔴 If the requested `index_uid` does not exist, the API returns an [index_not_found](0061-error-format-and-definitions.md#index_not_found) error. @@ -217,5 +205,5 @@ The auth layer can return the following errors if Meilisearch is secured (a mast N/A ## 5. Future Possibilities -- Delete `uid` or `name`. + - Rework the `primaryKey` concept \ No newline at end of file