You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: templates/java/api.mustache
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,11 @@ public class {{classname}} extends ApiClient {
56
56
{{#isSearchClient}}
57
57
private IngestionClient ingestionTransporter;
58
58
59
+
/**
60
+
* Sets the region of the current algolia application to the configuration, this is required to be called if you wish to leverage the transformation pipeline (via the *WithTransformation methods).
61
+
*
62
+
* @param region (required)
63
+
*/
59
64
public void setTransformationRegion(String region) {
60
65
this.ingestionTransporter = new IngestionClient(this.authInterceptor.getApplicationId(), this.authInterceptor.getApiKey(), region, this.clientOptions);
* to be created first, in order to transform records before indexing them to Algolia. The
536
+
* `region` must have been passed to the client instantiation method.
537
+
*
538
+
* @param string $indexName the `indexName` to replace `objects` in
539
+
* @param array $objects the array of `objects` to store in the given Algolia `indexName`
540
+
* @param bool $waitForTasks Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable
541
+
* @param array $batchSize The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
542
+
* @param array $requestOptions Request options
543
+
*/
544
+
public function saveObjectsWithTransformation($indexName, $objects, $waitForTasks = false, $batchSize = 1000, $requestOptions = [])
* Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
519
551
*
@@ -548,6 +580,24 @@ use Algolia\AlgoliaSearch\Exceptions\NotFoundException;
* to be created first, in order to transform records before indexing them to Algolia. The
587
+
* `region` must have been passed to the client instantiation method.
588
+
*
589
+
* @param string $indexName the `indexName` to replace `objects` in
590
+
* @param array $objects the array of `objects` to store in the given Algolia `indexName`
591
+
* @param bool $createIfNotExists To be provided if non-existing objects are passed, otherwise, the call will fail..
592
+
* @param bool $waitForTasks Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable
593
+
* @param array $batchSize The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
594
+
* @param array $requestOptions Request options
595
+
*/
596
+
public function partialUpdateObjectsWithTransformation($indexName, $objects, $createIfNotExists, $waitForTasks = false, $batchSize = 1000, $requestOptions = [])
Copy file name to clipboardExpand all lines: templates/php/client_config.mustache
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,25 @@ class {{configClassname}} extends {{#hasRegionalHost}}ConfigWithRegion{{/hasRegi
66
66
{
67
67
return $this->config['defaultMaxRetries'];
68
68
}
69
+
70
+
/**
71
+
* Sets the region of the current algolia application to the configuration, this is required to be called if you wish to leverage the transformation pipeline (via the *WithTransformation methods).
72
+
*
73
+
* @param string $region the user agent of the api client
0 commit comments