Interface UpdateIndexService

    • Method Detail

      • patchDocuments

        @PATCH
        Map<String,​UpdateIndexService.Result> patchDocuments​(@PathParam("indexName")
                                                                   String indexName,
                                                                   List<Document> docs)

        Partial update of an existing document. If the document does not exist, no update will be performed and status 404 is returned.

        In case the document is a master product with variants, the provided master product may only contain the changed values. However if some data at the product variants are updated, all data from all variant products are required, otherwise missing variants won't be there after the update!

        Parameters:
        indexName - name of the index that should receive that update
        docs - Full or partial document that carries the data for the update
        Returns:
        Result code, one of UPDATED, NOT_FOUND, NOOP, DISMISSED
      • putDocuments

        @PUT
        Map<String,​UpdateIndexService.Result> putDocuments​(String indexName,
                                                                 Boolean replaceExisting,
                                                                 List<Document> docs)

        Puts a document to the index. If document does not exist, it will be added.

        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:
        indexName - name of the index that should receive that update
        docs - The documents that should be added or updated at the index.
        replaceExisting - set to false to avoid overriding a document with that ID. Defaults to 'true'
        Returns:
        Result code, one of CREATED, UPDATED, NOOP, DISMISSED
      • deleteDocuments

        @DELETE
        Map<String,​UpdateIndexService.Result> deleteDocuments​(@PathParam("indexName")
                                                                    String indexName,
                                                                    @QueryParam("id[]")
                                                                    List<String> ids)
        Delete existing document. If document does not exist, it returns code 404.
        Parameters:
        indexName - name of the index that should receive that update
        ids - Array of IDs of the documents that should be deleted
        Returns:
        Result code, one of DELETED, NOT_FOUND