-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1984 from reebhub/PHP_indexBatch1_query
[PHP] Index Querying pages batch [Replace C# samples]
- Loading branch information
Showing
53 changed files
with
10,436 additions
and
37 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
...5.4/Raven.Documentation.Pages/client-api/commands/documents/delete.php.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Commands: Delete Document | ||
|
||
{NOTE: } | ||
|
||
* Use `DeleteDocumentCommand` to remove a document from the database. | ||
|
||
* In this page: | ||
|
||
* [Example](../../../client-api/commands/documents/delete#example) | ||
* [Syntax](../../../client-api/commands/documents/delete#syntax) | ||
|
||
{NOTE/} | ||
|
||
--- | ||
|
||
{PANEL: Example} | ||
|
||
{CODE:php delete_sample@ClientApi\Commands\Documents\Delete.php /} | ||
|
||
{PANEL/} | ||
|
||
|
||
{PANEL: Syntax} | ||
|
||
{CODE:php delete_interface@ClientApi\Commands\Documents\Delete.php /} | ||
|
||
| Parameters | Type | Description | | ||
|------------|------|-------------| | ||
| **idOrCopy** | `string` | ID of a document to be deleted | | ||
| **changeVector** | `string` (optional) | Entity Change Vector, used for concurrency checks (`None` to skip check) | | ||
|
||
{PANEL/} | ||
|
||
## Related Articles | ||
|
||
### Commands | ||
|
||
- [Get](../../../client-api/commands/documents/get) | ||
- [Put](../../../client-api/commands/documents/put) | ||
- [How to Send Multiple Commands Using a Batch](../../../client-api/commands/batches/how-to-send-multiple-commands-using-a-batch) |
130 changes: 130 additions & 0 deletions
130
...on/5.4/Raven.Documentation.Pages/client-api/commands/documents/get.php.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
# Commands: Get Documents | ||
|
||
{NOTE: } | ||
|
||
* Use `GetDocumentsCommand` to retrieve documents from the database. | ||
|
||
* In this page: | ||
- [Get single document](../../../client-api/commands/documents/get#get-single-document) | ||
- [Get multiple documents](../../../client-api/commands/documents/get#get-multiple-documents) | ||
- [Get paged documents](../../../client-api/commands/documents/get#get-paged-documents) | ||
- [Get documents by ID prefix](../../../client-api/commands/documents/get#get-documents-by-id-prefix) | ||
|
||
{NOTE/} | ||
|
||
--- | ||
|
||
{PANEL: Get single document} | ||
|
||
**GetDocumentsCommand** can be used to retrieve a single document | ||
|
||
#### Syntax: | ||
|
||
{CODE:php get_interface_single@ClientApi\Commands\Documents\Get.php /} | ||
|
||
| Parameters | Type | Description | | ||
|------------|------|-------------| | ||
| **id** | `string` | ID of the documents to get | | ||
| **includes** | `StringArray` or `array` or `null` | Related documents to fetch along with the document | | ||
| **metadataOnly** | `bool` | Whether to fetch the whole document or just its metadata. | | ||
|
||
--- | ||
|
||
#### Example: | ||
|
||
{CODE:php get_sample_single@ClientApi\Commands\Documents\Get.php /} | ||
|
||
{PANEL/} | ||
|
||
{PANEL: Get multiple documents} | ||
|
||
**GetDocumentsCommand** can also be used to retrieve a list of documents. | ||
|
||
#### Syntax: | ||
|
||
{CODE:php get_interface_multiple@ClientApi\Commands\Documents\Get.php /} | ||
|
||
| Parameters | Type | Description | | ||
|------------|------|-------------| | ||
| **ids** | `StringArray` or `array` or `null` | IDs of the documents to get | | ||
| **includes** | `StringArray` or `array` or `null` | Related documents to fetch along with the documents | | ||
| **metadataOnly** | `bool` | Whether to fetch whole documents or just the metadata | | ||
|
||
--- | ||
|
||
#### Example I | ||
|
||
{CODE:php get_sample_multiple@ClientApi\Commands\Documents\Get.php /} | ||
|
||
#### Example II - Using Includes | ||
|
||
{CODE:php get_sample_includes@ClientApi\Commands\Documents\Get.php /} | ||
|
||
#### Example III - Missing Documents | ||
|
||
{CODE:php get_sample_missing@ClientApi\Commands\Documents\Get.php /} | ||
|
||
{PANEL/} | ||
|
||
{PANEL: Get paged documents} | ||
|
||
**GetDocumentsCommand** can also be used to retrieve a paged set of documents. | ||
|
||
#### Syntax: | ||
|
||
{CODE:php get_interface_paged@ClientApi\Commands\Documents\Get.php /} | ||
|
||
| Parameters | Type | Description | | ||
|------------|------|-------------| | ||
| **start** | `int` | number of documents that should be skipped | | ||
| **pageSize** | `int` | maximum number of documents that will be retrieved | | ||
|
||
--- | ||
|
||
#### Example: | ||
|
||
{CODE:php get_sample_paged@ClientApi\Commands\Documents\Get.php /} | ||
|
||
{PANEL/} | ||
|
||
{PANEL: Get documents by ID prefix} | ||
|
||
**GetDocumentsCommand** can be used to retrieve multiple documents for a specified ID prefix. | ||
|
||
#### Syntax: | ||
|
||
{CODE:php get_interface_startswith@ClientApi\Commands\Documents\Get.php /} | ||
|
||
| Parameters | Type | Description | | ||
|------------|------|-------------| | ||
| **startWith** | `?string` | prefix for which documents should be returned | | ||
| **startAfter** | `?string` | skip 'document fetching' until the given ID is found, and return documents after that ID (default: None) | | ||
| **matches** | `?string` | pipe ('|') separated values for which document IDs (after `startWith`) should be matched ('?' any single character, '*' any characters) | | ||
| **exclude** | `?string` | pipe ('|') separated values for which document IDs (after `startWith`) should **not** be matched ('?' any single character, '*' any characters) | | ||
| **start** | `int` | number of documents that should be skipped | | ||
| **pageSize** | `int` | maximum number of documents that will be retrieved | | ||
| **metadataOnly** | `bool` | specifies whether or not only document metadata should be returned | | ||
|
||
--- | ||
|
||
#### Example I | ||
|
||
{CODE:php get_sample_startswith@ClientApi\Commands\Documents\Get.php /} | ||
|
||
#### Example II | ||
|
||
{CODE:php get_sample_startswith_matches@ClientApi\Commands\Documents\Get.php /} | ||
|
||
#### Example III | ||
|
||
{CODE:php get_sample_startswith_matches_end@ClientApi\Commands\Documents\Get.php /} | ||
|
||
{PANEL/} | ||
|
||
## Related Articles | ||
|
||
### Commands | ||
|
||
- [Put](../../../client-api/commands/documents/put) | ||
- [Delete](../../../client-api/commands/documents/delete) | ||
- [How to Send Multiple Commands Using a Batch](../../../client-api/commands/batches/how-to-send-multiple-commands-using-a-batch) |
41 changes: 41 additions & 0 deletions
41
...on/5.4/Raven.Documentation.Pages/client-api/commands/documents/put.php.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Commands: Put Document | ||
--- | ||
|
||
{NOTE: } | ||
|
||
* Use `PutDocumentCommand` to insert a document to the database or update an existing document. | ||
|
||
* In this page: | ||
|
||
* [Example](../../../client-api/commands/documents/put#example) | ||
* [Syntax](../../../client-api/commands/documents/put#syntax) | ||
|
||
{NOTE/} | ||
|
||
--- | ||
|
||
{PANEL: Example} | ||
|
||
{CODE:php put_sample@ClientApi\Commands\Documents\Put.php /} | ||
|
||
{PANEL/} | ||
|
||
{PANEL: Syntax} | ||
|
||
{CODE:php put_interface@ClientApi\Commands\Documents\Put.php /} | ||
|
||
| Parameters | Type | Description | | ||
| ------------- | ------------- | ----- | | ||
| **idOrCopy** | `string` | Unique ID under which document will be stored | | ||
| **changeVector** | `string` (optional) | Entity changeVector, used for concurrency checks (`None` to skip check) | | ||
| **document** | `array` | The document to store | | ||
|
||
{PANEL/} | ||
|
||
## Related Articles | ||
|
||
### Commands | ||
|
||
- [Get](../../../client-api/commands/documents/get) | ||
- [Delete](../../../client-api/commands/documents/delete) | ||
- [How to Send Multiple Commands Using a Batch](../../../client-api/commands/batches/how-to-send-multiple-commands-using-a-batch) |
Oops, something went wrong.