Skip to content

fix(batch): add missing BatchActionType#1149

Merged
Haroenv merged 1 commit intomasterfrom
fix/add-missing-batch-action-type
May 12, 2020
Merged

fix(batch): add missing BatchActionType#1149
Haroenv merged 1 commit intomasterfrom
fix/add-missing-batch-action-type

Conversation

@bodinsamuel
Copy link
Copy Markdown

@bodinsamuel bodinsamuel self-assigned this May 4, 2020
@Haroenv Haroenv requested a review from nunomaduro May 4, 2020 11:16
@Haroenv
Copy link
Copy Markdown
Contributor

Haroenv commented May 4, 2020

Seems to be inconsistent with the docs: https://www.algolia.com/doc/api-reference/api-methods/batch/#method-param-action

Do the docs also need to be updated?

PartialUpdateObject: 'partialUpdateObject',
PartialUpdateObjectNoCreate: 'partialUpdateObjectNoCreate',
DeleteObject: 'deleteObject',
DeleteIndex: 'delete',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@Ant-hem @aseure can you quick check those in your clients?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What do we need to check? If batch actions do accept delete? Could you open issues with polyglot with the exact context?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@aseure Correct. I will do it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@nunomaduro I've just checked and it's available in Go, Scala, Java, C#.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

can we merge this one as everybody seems to agree ? ☺️

@bodinsamuel
Copy link
Copy Markdown
Author

For the ref, we are currently using that in the crawler so it works. Probably need a doc update indeed.

Example:

var algoliasearch = require("algoliasearch");

const client = algoliasearch('<app>', '<key>');
await client.multipleBatch([
    {
      indexName: 'test-multiple-delete',
      action: 'addObject',
      body: { objectID: 'sample-objectID' },
    },
    {
      indexName: 'test-multiple-delete',
      action: 'clear',
      body: {},
    },
    {
      indexName: 'test-multiple-delete',
      action: 'delete',
      body: {},
    },
  ]);

@bodinsamuel
Copy link
Copy Markdown
Author

bodinsamuel commented May 12, 2020

@Haroenv can you review it during the absence of nuno ? ☺️

Copy link
Copy Markdown
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

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

the code itself is fine, but let's make sure we update the docs after

@Haroenv Haroenv merged commit 5bde85f into master May 12, 2020
@Haroenv Haroenv deleted the fix/add-missing-batch-action-type branch May 12, 2020 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants