HandlesDocuments
Table of Contents
Methods
- addDocuments() : Task
- addDocumentsCsv() : Task
- addDocumentsCsvInBatches() : array<int, Task>
- addDocumentsInBatches() : array<int, Task>
- addDocumentsJson() : Task
- addDocumentsNdjson() : Task
- addDocumentsNdjsonInBatches() : array<int, Task>
- deleteAllDocuments() : Task
- deleteDocument() : Task
- deleteDocuments() : Task
- getDocument() : array<string|int, mixed>
- getDocuments() : DocumentsResults
- updateDocuments() : Task
- updateDocumentsByFunction() : Task
- This is an EXPERIMENTAL feature, which may break without a major version.
- updateDocumentsCsv() : Task
- updateDocumentsCsvInBatches() : array<int, Task>
- updateDocumentsInBatches() : array<int, Task>
- updateDocumentsJson() : Task
- updateDocumentsNdjson() : Task
- updateDocumentsNdjsonInBatches() : array<int, Task>
- batch() : Generator
- batchCsvString() : Generator
- batchNdjsonString() : Generator
Methods
addDocuments()
public
addDocuments(array<string|int, mixed> $documents[, string|null $primaryKey = null ]) : Task
Parameters
- $documents : array<string|int, mixed>
- $primaryKey : string|null = null
Return values
TaskaddDocumentsCsv()
public
addDocumentsCsv(string $documents[, string|null $primaryKey = null ][, string|null $delimiter = null ]) : Task
Parameters
- $documents : string
- $primaryKey : string|null = null
- $delimiter : string|null = null
Return values
TaskaddDocumentsCsvInBatches()
public
addDocumentsCsvInBatches(string $documents[, int|null $batchSize = 1000 ][, string|null $primaryKey = null ][, string|null $delimiter = null ]) : array<int, Task>
Parameters
- $documents : string
- $batchSize : int|null = 1000
- $primaryKey : string|null = null
- $delimiter : string|null = null
Return values
array<int, Task>addDocumentsInBatches()
public
addDocumentsInBatches(array<string|int, mixed> $documents[, int|null $batchSize = 1000 ][, string|null $primaryKey = null ]) : array<int, Task>
Parameters
- $documents : array<string|int, mixed>
- $batchSize : int|null = 1000
- $primaryKey : string|null = null
Return values
array<int, Task>addDocumentsJson()
public
addDocumentsJson(string $documents[, string|null $primaryKey = null ]) : Task
Parameters
- $documents : string
- $primaryKey : string|null = null
Return values
TaskaddDocumentsNdjson()
public
addDocumentsNdjson(string $documents[, string|null $primaryKey = null ]) : Task
Parameters
- $documents : string
- $primaryKey : string|null = null
Return values
TaskaddDocumentsNdjsonInBatches()
public
addDocumentsNdjsonInBatches(string $documents[, int|null $batchSize = 1000 ][, string|null $primaryKey = null ]) : array<int, Task>
Parameters
- $documents : string
- $batchSize : int|null = 1000
- $primaryKey : string|null = null
Return values
array<int, Task>deleteAllDocuments()
public
deleteAllDocuments() : Task
Return values
TaskdeleteDocument()
public
deleteDocument(string|int $documentId) : Task
Parameters
- $documentId : string|int
Return values
TaskdeleteDocuments()
public
deleteDocuments(array<string|int, mixed> $options) : Task
Parameters
- $options : array<string|int, mixed>
Return values
TaskgetDocument()
public
getDocument(non-empty-string|int $documentId[, array<string|int, mixed>|null $fields = null ]) : array<string|int, mixed>
Parameters
- $documentId : non-empty-string|int
- $fields : array<string|int, mixed>|null = null
Return values
array<string|int, mixed>getDocuments()
public
getDocuments([DocumentsQuery|null $options = null ]) : DocumentsResults
Parameters
- $options : DocumentsQuery|null = null
Return values
DocumentsResultsupdateDocuments()
public
updateDocuments(array<string|int, mixed> $documents[, string|null $primaryKey = null ]) : Task
Parameters
- $documents : array<string|int, mixed>
- $primaryKey : string|null = null
Return values
TaskupdateDocumentsByFunction()
This is an EXPERIMENTAL feature, which may break without a major version.
public
updateDocumentsByFunction(non-empty-string $function[, array{filter?: non-empty-string|list|null, context?: array} $options = [] ]) : Task
It's available after Meilisearch v1.10.
More info about the feature: https://github.com/orgs/meilisearch/discussions/762 More info about experimental features in general: https://www.meilisearch.com/docs/reference/api/experimental-features
Parameters
- $function : non-empty-string
-
$options
: array{filter?: non-empty-string|list
|null, context?: array = []}
Return values
TaskupdateDocumentsCsv()
public
updateDocumentsCsv(string $documents[, string|null $primaryKey = null ][, string|null $delimiter = null ]) : Task
Parameters
- $documents : string
- $primaryKey : string|null = null
- $delimiter : string|null = null
Return values
TaskupdateDocumentsCsvInBatches()
public
updateDocumentsCsvInBatches(string $documents[, int|null $batchSize = 1000 ][, string|null $primaryKey = null ][, string|null $delimiter = null ]) : array<int, Task>
Parameters
- $documents : string
- $batchSize : int|null = 1000
- $primaryKey : string|null = null
- $delimiter : string|null = null
Return values
array<int, Task>updateDocumentsInBatches()
public
updateDocumentsInBatches(array<string|int, mixed> $documents[, int|null $batchSize = 1000 ][, string|null $primaryKey = null ]) : array<int, Task>
Parameters
- $documents : array<string|int, mixed>
- $batchSize : int|null = 1000
- $primaryKey : string|null = null
Return values
array<int, Task>updateDocumentsJson()
public
updateDocumentsJson(string $documents[, string|null $primaryKey = null ]) : Task
Parameters
- $documents : string
- $primaryKey : string|null = null
Return values
TaskupdateDocumentsNdjson()
public
updateDocumentsNdjson(string $documents[, string|null $primaryKey = null ]) : Task
Parameters
- $documents : string
- $primaryKey : string|null = null
Return values
TaskupdateDocumentsNdjsonInBatches()
public
updateDocumentsNdjsonInBatches(string $documents[, int|null $batchSize = 1000 ][, string|null $primaryKey = null ]) : array<int, Task>
Parameters
- $documents : string
- $batchSize : int|null = 1000
- $primaryKey : string|null = null
Return values
array<int, Task>batch()
private
static batch(array<string|int, mixed> $documents, int $batchSize) : Generator
Parameters
- $documents : array<string|int, mixed>
- $batchSize : int
Return values
GeneratorbatchCsvString()
private
static batchCsvString(string $documents, int $batchSize) : Generator
Parameters
- $documents : string
- $batchSize : int
Return values
GeneratorbatchNdjsonString()
private
static batchNdjsonString(string $documents, int $batchSize) : Generator
Parameters
- $documents : string
- $batchSize : int