v1

latestOpenAPI 3.0.3GPL-3.02026-07-177978150.2 KB
documents

Update documents with conditional query

The filter_by query parameter is used to filter to specify a condition against which the documents are matched. The request body contains the fields that should be updated for any documents that match the filter condition. This endpoint is only available if the Typesense server is version 0.25.0.rc12 or later.

patch/collections/{collectionName}/documents

Path parameters

collectionNamestring required

The name of the collection to update documents in

Query parameters

filter_bystring
{
  "filter_by": "num_employees:>100 && country: [USA, UK]"
}

Request body

object required

Can be any key-value pair

Response

The response contains a single field, num_updated, indicating the number of documents affected.

num_updatedinteger required

The number of documents that have been updated

Example response

{
  "num_updated": 1
}