Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change links of docs everywhere #3720

Merged
merged 1 commit into from May 4, 2023
Merged

Change links of docs everywhere #3720

merged 1 commit into from May 4, 2023

Conversation

curquiza
Copy link
Member

@curquiza curquiza commented May 2, 2023

Completely fixes #3668

@curquiza curquiza added the documentation Related to the documentation of this repository label May 2, 2023
@curquiza curquiza force-pushed the docs-links branch 2 times, most recently from 4fd6fcd to 8f612ba Compare May 2, 2023 14:04
@curquiza curquiza added this to the v1.2.0 milestone May 2, 2023
@curquiza curquiza requested a review from irevoire May 2, 2023 17:33
@curquiza curquiza marked this pull request as ready for review May 2, 2023 17:35
@curquiza curquiza marked this pull request as draft May 2, 2023 17:40
@curquiza curquiza requested review from irevoire and removed request for irevoire May 2, 2023 17:40
@curquiza curquiza marked this pull request as ready for review May 3, 2023 13:57
@curquiza curquiza requested a review from Kerollmops May 3, 2023 16:05
Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 😊
I let you merge 🐡

@curquiza
Copy link
Member Author

curquiza commented May 4, 2023

bors merge

meili-bors bot added a commit that referenced this pull request May 4, 2023
3550: Delete documents by filter r=irevoire a=dureuill

# Prototype `prototype-delete-by-filter-0`

Usage:
A new route is available under `POST /indexes/{index_uid}/documents/delete` that allows you to delete your documents by filter.
The expected payload looks like that:
```json
{
  "filter": "doggo = bernese",
}
```

It'll then enqueue a task in your task queue that'll delete all the documents matching this filter once it's processed.
Here is an example of the associated details;
```json
  "details": {
    "deletedDocuments": 53,
    "originalFilter": "\"doggo = bernese\""
  }
```

----------


# Pull Request

## Related issue
Related to #3477

## What does this PR do?

### User standpoint

- Modifies the `/indexes/{:indexUid}/documents/delete-batch` route to accept either the existing array of documents ids, or a JSON object with a `filter` field representing a filter to apply. If that latter variant is used, any document matching the filter will be deleted.

### Implementation standpoint

- (processing time version) Adds a new BatchKind that is not autobatchable and that performs the delete by filter
- Reuse the `documentDeletion` task with a new `originalFilter` detail that replaces the `providedIds` detail.

## Example

<details>
<summary>Sample request, response and task result</summary>

Request:

```
curl \
  -X POST 'http://localhost:7700/indexes/index-10/documents/delete-batch' \
  -H 'Content-Type: application/json' \
  --data-binary '{ "filter" : "mass = 600"}'
```

Response:

```
{
  "taskUid": 3902,
  "indexUid": "index-10",
  "status": "enqueued",
  "type": "documentDeletion",
  "enqueuedAt": "2023-02-28T20:50:31.667502Z"
}
```

Task log:

```json
    {
      "uid": 3906,
      "indexUid": "index-12",
      "status": "succeeded",
      "type": "documentDeletion",
      "canceledBy": null,
      "details": {
        "deletedDocuments": 3,
        "originalFilter": "\"mass = 600\""
      },
      "error": null,
      "duration": "PT0.001819S",
      "enqueuedAt": "2023-03-07T08:57:20.11387Z",
      "startedAt": "2023-03-07T08:57:20.115895Z",
      "finishedAt": "2023-03-07T08:57:20.117714Z"
    }
```

</details>

## Draft status

- [ ] Error handling
- [ ] Analytics
- [ ] Do we want to reuse the `delete-batch` route in this way, or create a new route instead?
- [ ] Should the filter be applied at request time or when the deletion task is processed? 
  - The first commit in this PR applies the filter at request time, meaning that even if a document is modified in a way that no longer matches the filter in a later update, it will be deleted as long as the deletion task is processed after that update. 
  - The other commits in this PR apply the filter only when the asynchronous deletion task is processed, meaning that documents that match the filter at processing time are deleted even if they didn't match the filter at request time.
- [ ] If keeping the filter at request time, find a more elegant way to recover the user document ids from the internal document ids. The current way implemented in the first commit of this PR involves getting all the documents matching the filter, looking for the value of their primary key, and turning it into a string by copy-pasting routines found in milli...
- [ ] Security consideration, if any
- [ ] Fix the tests (but waiting until product questions are resolved)
- [ ] Add delete by filter specific tests



3720: Change links of docs everywhere r=curquiza a=curquiza

Completely fixes #3668 

Co-authored-by: Louis Dureuil <louis@meilisearch.com>
Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: curquiza <clementine@meilisearch.com>
@meili-bors
Copy link
Contributor

meili-bors bot commented May 4, 2023

Build failed (retrying...):

@curquiza
Copy link
Member Author

curquiza commented May 4, 2023

bors try

@curquiza
Copy link
Member Author

curquiza commented May 4, 2023

bors merge

@meili-bors
Copy link
Contributor

meili-bors bot commented May 4, 2023

Already running a review

meili-bors bot added a commit that referenced this pull request May 4, 2023
@meili-bors
Copy link
Contributor

meili-bors bot commented May 4, 2023

try

Build failed:

@meili-bors
Copy link
Contributor

meili-bors bot commented May 4, 2023

Build succeeded:

@meili-bors meili-bors bot merged commit e0537c3 into main May 4, 2023
9 checks passed
@meili-bors meili-bors bot deleted the docs-links branch May 4, 2023 10:44
@meili-bot meili-bot added the v1.2.0 PRs/issues solved in v1.2.0 released on 2023-06-05 label Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Related to the documentation of this repository v1.2.0 PRs/issues solved in v1.2.0 released on 2023-06-05
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update messages pointing to the docs website
3 participants