Reference documentation and code samples for the Vector Search V1 API class Google::Cloud::VectorSearch::V1::SemanticSearch.
Defines a semantic search operation.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#filter
def filter() -> ::Google::Protobuf::Struct
Returns
- (::Google::Protobuf::Struct) — Optional. A JSON filter expression, e.g. {"genre": \{"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
#filter=
def filter=(value) -> ::Google::Protobuf::Struct
Parameter
- value (::Google::Protobuf::Struct) — Optional. A JSON filter expression, e.g. {"genre": \{"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
Returns
- (::Google::Protobuf::Struct) — Optional. A JSON filter expression, e.g. {"genre": \{"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
#output_fields
def output_fields() -> ::Google::Cloud::VectorSearch::V1::OutputFields
Returns
- (::Google::Cloud::VectorSearch::V1::OutputFields) — Optional. The fields to return in the search results.
#output_fields=
def output_fields=(value) -> ::Google::Cloud::VectorSearch::V1::OutputFields
Parameter
- value (::Google::Cloud::VectorSearch::V1::OutputFields) — Optional. The fields to return in the search results.
Returns
- (::Google::Cloud::VectorSearch::V1::OutputFields) — Optional. The fields to return in the search results.
#search_field
def search_field() -> ::String
Returns
- (::String) — Required. The vector field to search.
#search_field=
def search_field=(value) -> ::String
Parameter
- value (::String) — Required. The vector field to search.
Returns
- (::String) — Required. The vector field to search.
#search_hint
def search_hint() -> ::Google::Cloud::VectorSearch::V1::SearchHint
Returns
- (::Google::Cloud::VectorSearch::V1::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.
#search_hint=
def search_hint=(value) -> ::Google::Cloud::VectorSearch::V1::SearchHint
Parameter
- value (::Google::Cloud::VectorSearch::V1::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.
Returns
- (::Google::Cloud::VectorSearch::V1::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.
#search_text
def search_text() -> ::String
Returns
- (::String) — Required. The query text, which is used to generate an embedding according to the embedding model specified in the collection config.
#search_text=
def search_text=(value) -> ::String
Parameter
- value (::String) — Required. The query text, which is used to generate an embedding according to the embedding model specified in the collection config.
Returns
- (::String) — Required. The query text, which is used to generate an embedding according to the embedding model specified in the collection config.
#task_type
def task_type() -> ::Google::Cloud::VectorSearch::V1::EmbeddingTaskType
Returns
- (::Google::Cloud::VectorSearch::V1::EmbeddingTaskType) — Required. The task type of the query embedding.
#task_type=
def task_type=(value) -> ::Google::Cloud::VectorSearch::V1::EmbeddingTaskType
Parameter
- value (::Google::Cloud::VectorSearch::V1::EmbeddingTaskType) — Required. The task type of the query embedding.
Returns
- (::Google::Cloud::VectorSearch::V1::EmbeddingTaskType) — Required. The task type of the query embedding.
#top_k
def top_k() -> ::Integer
Returns
- (::Integer) — Optional. The number of data objects to return.
#top_k=
def top_k=(value) -> ::Integer
Parameter
- value (::Integer) — Optional. The number of data objects to return.
Returns
- (::Integer) — Optional. The number of data objects to return.