Reference documentation and code samples for the Google Cloud Vector Search V1 Client class SemanticSearch.
Defines a semantic search operation.
Generated from protobuf message google.cloud.vectorsearch.v1.SemanticSearch
Namespace
Google \ Cloud \ VectorSearch \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ search_text
string
Required. The query text, which is used to generate an embedding according to the embedding model specified in the collection config.
↳ search_field
string
Required. The vector field to search.
↳ task_type
int
Required. The task type of the query embedding.
↳ output_fields
↳ filter
Google\Protobuf\Struct
Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
↳ top_k
int
Optional. The number of data objects to return.
↳ search_hint
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.
getSearchText
Required. The query text, which is used to generate an embedding according to the embedding model specified in the collection config.
string
setSearchText
Required. The query text, which is used to generate an embedding according to the embedding model specified in the collection config.
var
string
$this
getSearchField
Required. The vector field to search.
string
setSearchField
Required. The vector field to search.
var
string
$this
getTaskType
Required. The task type of the query embedding.
setTaskType
Required. The task type of the query embedding.
$this
getOutputFields
Optional. The fields to return in the search results.
hasOutputFields
clearOutputFields
setOutputFields
Optional. The fields to return in the search results.
$this
getFilter
Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
hasFilter
clearFilter
setFilter
Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.
$this
getTopK
Optional. The number of data objects to return.
int
hasTopK
clearTopK
setTopK
Optional. The number of data objects to return.
var
int
$this
getSearchHint
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.
hasSearchHint
clearSearchHint
setSearchHint
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.
$this

