View on GitHub

Open Commerce Search Stack

The Documentation

UpdateApi

All URIs are relative to http://localhost

Method HTTP request Description
deleteDocuments DELETE /indexer-api/v1/update/{indexName}  
patchDocuments PATCH /indexer-api/v1/update/{indexName}  
putDocuments PUT /indexer-api/v1/update/{indexName}  

deleteDocuments

deleteDocuments(indexName, id[])

Delete existing document. If document does not exist, it returns code 304.

Parameters

Name Type Description Notes
indexName String   [default to null]
id[] List   [optional] [default to null]

Return type

null (empty response body)

Authorization

basic-auth

HTTP request headers

patchDocuments

patchDocuments(indexName)

Partial update of existing documents. If a document does not exist, no update will be performed and it gets the result status 'NOT_FOUND'. In case a document is a master product with variants, the provided master product may only contain the changed values. However if some of the variants should be updated, all data from all variant products are required, unless you have an ID data-field inside variant - then you can update single variants. Without variant ID field, the missing variants won't be there after the update! This is how single variants can be deleted.

Parameters

Name Type Description Notes
indexName String   [default to null]

Return type

null (empty response body)

Authorization

basic-auth

HTTP request headers

putDocuments

putDocuments(indexName, replaceExisting, langCode)

Puts a document to the index. If document does not exist, it will be added, but in that case the langCode parameter is required. An existing product will be overwritten unless the parameter 'replaceExisting\" is set to \"false\". Provided document should be a complete object, partial updates should be done using the updateDocument method.

Parameters

Name Type Description Notes
indexName String   [default to null]
replaceExisting Boolean set to false to avoid overriding a document with that ID. Defaults to 'true' [optional] [default to null]
langCode String If this put request targets an index that does not exist yet, that index will be created. To use the correct index template, the language is required for that case. Otherwise its ignored. [optional] [default to null]

Return type

null (empty response body)

Authorization

basic-auth

HTTP request headers