Skip to content

Commit 4be66cf

Browse files
committed
chore: playground
1 parent 405c5e4 commit 4be66cf

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

playground/javascript/node/algoliasearch.ts

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,24 @@ async function testAlgoliasearchBridgeIngestion() {
136136
// Init client with appId and apiKey
137137
const client = algoliasearch(appId, adminApiKey, { transformation: { region: 'eu' } });
138138

139-
await client.saveObjectsWithTransformation({
140-
indexName: 'foo',
141-
objects: [{ objectID: 'foo', data: { baz: 'baz', win: 42 } }],
142-
waitForTasks: true,
143-
});
144-
145-
await client.partialUpdateObjectsWithTransformation({
146-
indexName: 'foo',
147-
objects: [{ objectID: 'foo', data: { baz: 'baz', win: 42 } }],
148-
waitForTasks: true,
149-
createIfNotExists: false,
150-
});
139+
// console.log('saveObjectsWithTransformation', await client.saveObjectsWithTransformation({
140+
// indexName: 'foo',
141+
// objects: [{ objectID: 'foo', data: { baz: 'baz', win: 42 } }],
142+
// waitForTasks: true,
143+
// }));
144+
//
145+
// console.log('partialUpdateObjectsWithTransformation', await client.partialUpdateObjectsWithTransformation({
146+
// indexName: 'foo',
147+
// objects: [{ objectID: 'foo', data: { baz: 'baz', win: 42 } }],
148+
// waitForTasks: true,
149+
// createIfNotExists: false,
150+
// }));
151+
152+
console.log('replaceAllObjectsWithTransformation', await client.replaceAllObjectsWithTransformation({
153+
indexName: 'boyd',
154+
objects: [{ objectID: 'foo', data: { baz: 'baz', win: 42 } }, { objectID: 'bar', data: { baz: 'baz', win: 24 } }],
155+
batchSize: 2
156+
}));
151157
}
152158

153159
// testAlgoliasearch();

0 commit comments

Comments
 (0)