Service Client: Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::DataObjectSearchServiceClient
Client stub representing the remote DataObjectSearchService gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to vectorsearch.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService - Compiled Protocol Buffers messages for google/cloud/vectorsearch/v1beta/data_object_search_service.proto
SYNOPSIS
use Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService;
my $msg = Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::OutputFields->new({
data_fields => $data_fields,
vector_fields => $vector_fields,
metadata_fields => $metadata_fields,
});
# Read or update a field
my $val = $msg->data_fields();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::OutputFields->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/vectorsearch/v1beta/data_object_search_service.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::OutputFields
Defines a output fields struct for data in DataObject.
Inherits from Protobuf::Message.
Accessors
$msg->data_fields()/$msg->data_fields($value)Type:
StringOptional. The fields from the data fields to include in the output.
$msg->vector_fields()/$msg->vector_fields($value)Type:
StringOptional. The fields from the vector fields to include in the output.
$msg->metadata_fields()/$msg->metadata_fields($value)Type:
StringOptional. The fields from the DataObject metadata to include in the output.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchHint
Represents a hint to the search index engine.
Inherits from Protobuf::Message.
Accessors
$msg->use_index()/$msg->use_index($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchHint::IndexHint)Optional. Deprecated: Use `index_hint` instead. Specifies that the search should use a particular index.
$msg->use_knn()/$msg->use_knn($value)Type:
BoolOptional. Deprecated: Use `knn_hint` instead. If set to true, the search will use the system's default K-Nearest Neighbor (KNN) index engine.
$msg->knn_hint()/$msg->knn_hint($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchHint::KnnHint)Optional. If set, the search will use the system's default K-Nearest Neighbor (KNN) index engine.
$msg->index_hint()/$msg->index_hint($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchHint::IndexHint)Optional. Specifies that the search should use a particular index.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::Search
A single search request within a batch operation.
Inherits from Protobuf::Message.
Accessors
$msg->vector_search()/$msg->vector_search($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::VectorSearch)A vector-based search.
$msg->semantic_search()/$msg->semantic_search($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SemanticSearch)A semantic search.
$msg->text_search()/$msg->text_search($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::TextSearch)A text search operation.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::VectorSearch
Defines a search operation using a query vector.
Inherits from Protobuf::Message.
Accessors
$msg->vector()/$msg->vector($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObject::DenseVector)A dense vector for the query.
$msg->sparse_vector()/$msg->sparse_vector($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObject::SparseVector)A sparse vector for the query.
$msg->search_field()/$msg->search_field($value)Type:
StringRequired. The vector field to search.
$msg->filter()/$msg->filter($value)Type:
Message(Google::Protobuf::Struct::Struct)Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
$msg->top_k()/$msg->top_k($value)Type:
Int32Optional. The number of nearest neighbors to return.
$msg->output_fields()/$msg->output_fields($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::OutputFields)Optional. Mask specifying which fields to return.
$msg->search_hint()/$msg->search_hint($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchHint)Optional. Sets the search hint. If no strategy is specified, the service will use an index if one is available, and fall back to the default KNN search otherwise.
$msg->distance_metric()/$msg->distance_metric($value)Type:
Enum(Google::Cloud::Vectorsearch::V1beta::DistanceMetric)Optional. The distance metric to use for the KNN search. If not specified, DOT_PRODUCT will be used as the default.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SemanticSearch
Defines a semantic search operation.
Inherits from Protobuf::Message.
Accessors
$msg->search_text()/$msg->search_text($value)Type:
StringOptional. The query text, which is used to generate an embedding according to the embedding model specified in the collection config.
Required when using the text search mode.
$msg->search_field()/$msg->search_field($value)Type:
StringRequired. The vector field to search.
$msg->task_type()/$msg->task_type($value)Type:
Enum(Google::Cloud::Vectorsearch::V1beta::EmbeddingTaskType)Optional. The task type of the query embedding. Must be specified for text-only embedding models, see <https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/embeddings/task-types> Not needed for multi modal embedding models, see <https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/embeddings/get-multimodal-embeddings#specify-task-instructions>
$msg->output_fields()/$msg->output_fields($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::OutputFields)Optional. The fields to return in the search results.
$msg->filter()/$msg->filter($value)Type:
Message(Google::Protobuf::Struct::Struct)Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
$msg->top_k()/$msg->top_k($value)Type:
Int32Optional. The number of data objects to return.
$msg->search_hint()/$msg->search_hint($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchHint)Optional. Sets the search hint. If no strategy is specified, the service will use an index if one is available, and fall back to KNN search otherwise.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::TextSearch
Defines a text search operation.
Inherits from Protobuf::Message.
Accessors
$msg->search_text()/$msg->search_text($value)Type:
StringOptional. The query text. Required when using the default text search mode.
$msg->data_field_names()/$msg->data_field_names($value)Type:
StringOptional. The data field names to search. Required when using the default text search mode.
$msg->output_fields()/$msg->output_fields($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::OutputFields)Optional. The fields to return in the search results.
$msg->top_k()/$msg->top_k($value)Type:
Int32Optional. The number of results to return.
$msg->filter()/$msg->filter($value)Type:
Message(Google::Protobuf::Struct::Struct)Optional. A JSON filter expression, e.g. `{"genre": {"$eq": "sci-fi"}}`, represented as a `google.protobuf.Struct`.
$msg->structured_query()/$msg->structured_query($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::StructuredQuery)Optional. Structured query definition. When set, `search_text` and `data_field_names` must be left empty; otherwise the request will be rejected with an `INVALID_ARGUMENT` error. Conversely, when `structured_query` is unset, both `search_text` and `data_field_names` are required.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::StructuredQuery
A structured query for text search. Allows expressing field-targeted text queries combined via boolean operators, with optional per-node boosting.
Inherits from Protobuf::Message.
Accessors
$msg->text()/$msg->text($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::TextQuery)Optional. A leaf-level text query.
$msg->unary()/$msg->unary($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::UnaryQuery)Optional. A query that applies a unary operator to a sub-query.
$msg->combine()/$msg->combine($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::CombinedQuery)Optional. A query that combines multiple sub-queries with a boolean operator.
$msg->boost()/$msg->boost($value)Type:
FloatOptional. Optional multiplier applied to this query node's contribution to the final relevance score. Must be non-negative; if unset or 0, defaults to 1.0. Values greater than 1.0 increase its influence on ranking, values between 0.0 and 1.0 decrease it.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::TextQuery
A leaf-level text query targeting one or more data fields. When multiple fields are specified, this is equivalent to combining per-field matches with an OR operator (i.e. the query matches if the text is found in any of the listed fields).
Inherits from Protobuf::Message.
Accessors
$msg->text()/$msg->text($value)Type:
StringRequired. The text to search for.
$msg->fields()/$msg->fields($value)Type:
StringRequired. The data fields to search against.
$msg->match_type()/$msg->match_type($value)Type:
Enum(Google::Cloud::Vectorsearch::V1beta::TextQuery::MatchType)Optional. The matching strategy to apply for this query. If unset, defaults to `STANDARD`.
$msg->query_enhancement()/$msg->query_enhancement($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::QueryEnhancement)Optional. The query enhancement settings to apply for this query.
Enum: TextQuery::MatchType
MATCH_TYPE_UNSPECIFIED=>0TEXT=>1EXACT=>2
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::QueryEnhancement
Query enhancement settings. When enabled, expands the search terms with stemming, synonyms, and spelling corrections, and removes stop words.
Inherits from Protobuf::Message.
Accessors
$msg->enabled()/$msg->enabled($value)Type:
BoolOptional. Whether query enhancement is enabled.
$msg->language_code()/$msg->language_code($value)Type:
StringOptional. The IETF BCP 47 language tag, such as "en-US", for query enhancement. If unset, the language is detected automatically. See <https://en.wikipedia.org/wiki/IETF_language_tag>.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::UnaryQuery
A query that applies a unary operator to a sub-query.
Inherits from Protobuf::Message.
Accessors
$msg->op()/$msg->op($value)Type:
Enum(Google::Cloud::Vectorsearch::V1beta::UnaryQuery::Operator)Required. The unary operator to apply.
$msg->sub_query()/$msg->sub_query($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::StructuredQuery)Required. The sub-query the operator is applied to.
Enum: UnaryQuery::Operator
OPERATOR_UNSPECIFIED=>0NOT=>1
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::CombinedQuery
A query that combines multiple sub-queries with a boolean operator.
Inherits from Protobuf::Message.
Accessors
$msg->op()/$msg->op($value)Type:
Enum(Google::Cloud::Vectorsearch::V1beta::CombinedQuery::Operator)Required. The boolean operator used to combine the sub-queries.
$msg->sub_queries()/$msg->sub_queries($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::StructuredQuery)Required. The sub-queries to be combined.
Enum: CombinedQuery::Operator
OPERATOR_UNSPECIFIED=>0AND=>1OR=>2
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchDataObjectsRequest
Request for performing a single search.
Inherits from Protobuf::Message.
Accessors
$msg->vector_search()/$msg->vector_search($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::VectorSearch)A vector search operation.
$msg->semantic_search()/$msg->semantic_search($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SemanticSearch)A semantic search operation.
$msg->text_search()/$msg->text_search($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::TextSearch)Optional. A text search operation.
$msg->parent()/$msg->parent($value)Type:
StringRequired. The resource name of the Collection for which to search. Format: `projects/{project}/locations/{location}/collections/{collection}`
$msg->page_size()/$msg->page_size($value)Type:
Int32Optional. The standard list page size. Only supported for KNN. If not set, up to search_type.top_k results will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
$msg->page_token()/$msg->page_token($value)Type:
StringOptional. The standard list page token. Typically obtained via [SearchDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1beta.SearchDataObjectsResponse.next_page_token] of the previous [DataObjectSearchService.SearchDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.SearchDataObjects] call.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchResult
A single search result.
Inherits from Protobuf::Message.
Accessors
$msg->data_object()/$msg->data_object($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObject::DataObject)Output only. The matching data object.
$msg->distance()/$msg->distance($value)Type:
DoubleOutput only. Similarity distance or ranker score returned by BatchSearchDataObjects.
$msg->search_result_metadata()/$msg->search_result_metadata($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchResult::SearchResultMetadata)Output only. Quality signals for this result. Only populated when [BatchSearchDataObjectsRequest.BatchSearchMetadataOptions.search_signals_enabled][google.cloud.vectorsearch.v1beta.BatchSearchDataObjectsRequest.BatchSearchMetadataOptions.search_signals_enabled] is `true`.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchResponseMetadata
Metadata about the search execution.
Inherits from Protobuf::Message.
Accessors
$msg->used_index()/$msg->used_index($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchResponseMetadata::IndexInfo)Indicates that the search used a particular index.
$msg->used_knn()/$msg->used_knn($value)Type:
BoolOutput only. If true, the search used the system's default K-Nearest Neighbor (KNN) index engine.
$msg->warnings()/$msg->warnings($value)Type:
Message(Google::Rpc::Status::Status)Output only. Warnings or non-fatal errors that occurred during execution.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchDataObjectsResponse
Response for a search request.
Inherits from Protobuf::Message.
Accessors
$msg->results()/$msg->results($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchResult)Output only. The list of dataObjects that match the search criteria.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringOutput only. A token to retrieve next page of results. Pass to [DataObjectSearchService.SearchDataObjectsRequest.page_token][] to obtain that page.
$msg->search_response_metadata()/$msg->search_response_metadata($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchResponseMetadata)Output only. Metadata about the search execution.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::AggregateDataObjectsRequest
Request message for [DataObjectSearchService.AggregateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.AggregateDataObjects].
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The resource name of the Collection for which to query. Format: `projects/{project}/locations/{location}/collections/{collection}`
$msg->filter()/$msg->filter($value)Type:
Message(Google::Protobuf::Struct::Struct)Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
$msg->aggregate()/$msg->aggregate($value)Type:
Enum(Google::Cloud::Vectorsearch::V1beta::AggregationMethod)Required. The aggregation method to apply to the query.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::AggregateDataObjectsResponse
Response message for [DataObjectSearchService.AggregateDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.AggregateDataObjects].
Inherits from Protobuf::Message.
Accessors
$msg->aggregate_results()/$msg->aggregate_results($value)Type:
Message(Google::Protobuf::Struct::Struct)Output only. The aggregated results of the query.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::QueryDataObjectsRequest
Request message for [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.QueryDataObjects].
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The resource name of the Collection for which to query. Format: `projects/{project}/locations/{location}/collections/{collection}`
$msg->filter()/$msg->filter($value)Type:
Message(Google::Protobuf::Struct::Struct)Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
$msg->output_fields()/$msg->output_fields($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::OutputFields)Optional. Mask specifying which fields to return.
$msg->page_size()/$msg->page_size($value)Type:
Int32Optional. The standard list page size. Default is 100. The maximum value is 1000; values above 1000 will be coerced to 1000.
$msg->page_token()/$msg->page_token($value)Type:
StringOptional. The standard list page token. Typically obtained via [QueryDataObjectsResponse.next_page_token][google.cloud.vectorsearch.v1beta.QueryDataObjectsResponse.next_page_token] of the previous [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.QueryDataObjects] call.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::QueryDataObjectsResponse
Response message for [DataObjectSearchService.QueryDataObjects][google.cloud.vectorsearch.v1beta.DataObjectSearchService.QueryDataObjects].
Inherits from Protobuf::Message.
Accessors
$msg->data_objects()/$msg->data_objects($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObject::DataObject)Output only. The list of dataObjects that match the query.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringOutput only. A token to retrieve next page of results. Pass to [DataObjectSearchService.QueryDataObjectsRequest.page_token][] to obtain that page.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::BatchSearchDataObjectsRequest
A request to perform a batch of search operations.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The resource name of the Collection for which to search. Format: `projects/{project}/locations/{location}/collections/{collection}`
$msg->searches()/$msg->searches($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::Search)Required. A list of search requests to execute in parallel.
$msg->combine()/$msg->combine($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::BatchSearchDataObjectsRequest::CombineResultsOptions)Optional. Options for combining the results of the batch search operations.
$msg->metadata_options()/$msg->metadata_options($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::BatchSearchDataObjectsRequest::BatchSearchMetadataOptions)Optional. Options controlling which metadata is included in the search results.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::Ranker
Defines a ranker to combine results from multiple searches.
Inherits from Protobuf::Message.
Accessors
$msg->rrf()/$msg->rrf($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::ReciprocalRankFusion)Reciprocal Rank Fusion ranking.
$msg->vertex_ranker()/$msg->vertex_ranker($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::VertexRanker)Optional. Vertex AI ranking.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::ReciprocalRankFusion
Defines the Reciprocal Rank Fusion (RRF) algorithm for result ranking.
Inherits from Protobuf::Message.
Accessors
$msg->weights()/$msg->weights($value)Type:
DoubleRequired. The weights to apply to each search result set during fusion.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::VertexRanker
Defines a ranker using the Vertex AI ranking service. See <https://cloud.google.com/generative-ai-app-builder/docs/ranking> for details.
Inherits from Protobuf::Message.
Accessors
$msg->text_record_spec()/$msg->text_record_spec($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::VertexRanker::TextRecordSpec)The record spec for text search.
$msg->model()/$msg->model($value)Type:
StringRequired. The model used for ranking documents. The list of available models is described in <https://docs.cloud.google.com/generative-ai-app-builder/docs/ranking#models>. Currently, only `semantic-ranker-fast@latest` is supported.
$msg->top_n()/$msg->top_n($value)Type:
Int32Required. The number of documents to be processed for ranking.
Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::BatchSearchDataObjectsResponse
A response from a batch search operation.
Inherits from Protobuf::Message.
Accessors
$msg->results()/$msg->results($value)Type:
Message(Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::SearchDataObjectsResponse)Output only. A list of search responses, one for each request in the batch. If a ranker is used, a single ranked list of results is returned.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Vectorsearch::V1beta::DataObjectSearchService::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.