Skip to content

Commit 5f01572

Browse files
committed
Support for export options
1 parent a9df348 commit 5f01572

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.5'
22

33
services:
44
typesense:
5-
image: typesense/typesense:0.20.0.rc39
5+
image: typesense/typesense:0.21.0.rc20
66
environment:
77
TYPESENSE_DATA_DIR: /data
88
TYPESENSE_API_KEY: xyz

examples/collection_operations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
echo "\n";
137137

138138
echo "--------Export Documents-------\n";
139-
$exportedDocStrs = $client->collections['books']->documents->export();
139+
$exportedDocStrs = $client->collections['books']->documents->export(["exclude_fields" => "authors_facet"]);
140140
print_r($exportedDocStrs);
141141
echo "--------Export Documents-------\n";
142142
echo "\n";

src/Documents.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,14 @@ public function import($documents, array $options = [])
160160
}
161161

162162
/**
163+
* @param array $queryParams
164+
*
163165
* @return string
164166
* @throws TypesenseClientError|HttpClientException
165167
*/
166-
public function export(): string
168+
public function export(array $queryParams = []): string
167169
{
168-
return $this->apiCall->get($this->endPointPath('export'), [], false);
170+
return $this->apiCall->get($this->endPointPath('export'), $queryParams, false);
169171
}
170172

171173
/**

0 commit comments

Comments
 (0)