Package com.google.cloud.vectorsearch.v1beta


@Generated("by gapic-generator-java") package com.google.cloud.vectorsearch.v1beta
A client to Vector Search API

The interfaces provided are listed below, along with usage samples.

======================= DataObjectSearchServiceClient =======================

Service Description: Service for searching data objects.

Sample for DataObjectSearchServiceClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataObjectSearchServiceClient dataObjectSearchServiceClient =
     DataObjectSearchServiceClient.create()) {
   AggregateDataObjectsRequest request =
       AggregateDataObjectsRequest.newBuilder()
           .setParent(CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]").toString())
           .setFilter(Struct.newBuilder().build())
           .setAggregate(AggregationMethod.forNumber(0))
           .build();
   AggregateDataObjectsResponse response =
       dataObjectSearchServiceClient.aggregateDataObjects(request);
 }
 

======================= DataObjectServiceClient =======================

Service Description: Service for creating and managing data objects.

Sample for DataObjectServiceClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (DataObjectServiceClient dataObjectServiceClient = DataObjectServiceClient.create()) {
   CollectionName parent = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]");
   DataObject dataObject = DataObject.newBuilder().build();
   String dataObjectId = "dataObjectId1417732740";
   DataObject response =
       dataObjectServiceClient.createDataObject(parent, dataObject, dataObjectId);
 }
 

======================= VectorSearchServiceClient =======================

Service Description: VectorSearchService provides methods for managing Collection resources, and Collection Index resources. The primary resources offered by this service are Collections which are a container for a set of related JSON data objects, and Collection Indexes which enable efficient ANN search across data objects within a Collection.

Sample for VectorSearchServiceClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (VectorSearchServiceClient vectorSearchServiceClient = VectorSearchServiceClient.create()) {
   CollectionName name = CollectionName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]");
   Collection response = vectorSearchServiceClient.getCollection(name);
 }