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

Commit

Permalink
Remove name field
Browse files Browse the repository at this point in the history
  • Loading branch information
gmourier committed May 16, 2022
1 parent 28ae026 commit b0bcd1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
7 changes: 0 additions & 7 deletions open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -61,7 +57,6 @@ components:
$ref: '#/components/schemas/timestamp'
required:
- uid
- name
- createdAt
- updatedAt
document:
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
20 changes: 4 additions & 16 deletions text/0132-indexes-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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

0 comments on commit b0bcd1d

Please sign in to comment.