Description

The "Upsert" endpoint allows you to upsert the provided geometries.

Proto Definition


service BGSearch {
      rpc Upsert (UpsertArgs) returns (UpsertResult) {}
}

Input Message

Name: UpsertArgs

AttributeTypeDescription
collectionstringThe name of the collection.
IndexedGeometrygeometriesThe Geometries and the payload to upsert.
message UpsertArgs {
  string collection = 1;
  repeated IndexedGeometry geometries = 2;
}

Output Message

Name: UpsertResult

AttributeTypeDescription
num_updateduint64The number of entries that are updated.
num_inserteduint64The number of entries that are created.
message UpsertResult {
  uint64 num_inserted = 1;
  uint64 num_updated = 2;
}

Status Code

  • 5: NOT_FOUND if a collection with the provided name does not exist.