Vector Search v1 API - Class SemanticSearch (1.0.0-beta01)

public sealed class SemanticSearch : IMessage<SemanticSearch>, IEquatable<SemanticSearch>, IDeepCloneable<SemanticSearch>, IBufferMessage, IMessage

Reference documentation and code samples for the Vector Search v1 API class SemanticSearch.

Defines a semantic search operation.

Inheritance

object > SemanticSearch

Namespace

Google.Cloud.VectorSearch.V1

Assembly

Google.Cloud.VectorSearch.V1.dll

Constructors

SemanticSearch()

public SemanticSearch()

SemanticSearch(SemanticSearch)

public SemanticSearch(SemanticSearch other)
Parameter
Name Description
other SemanticSearch

Properties

Filter

public Struct Filter { get; set; }

Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}}, represented as a google.protobuf.Struct.

Property Value
Type Description
Struct

HasTopK

public bool HasTopK { get; }

Gets whether the "top_k" field is set

Property Value
Type Description
bool

OutputFields

public OutputFields OutputFields { get; set; }

Optional. The fields to return in the search results.

Property Value
Type Description
OutputFields

SearchField

public string SearchField { get; set; }

Required. The vector field to search.

Property Value
Type Description
string

SearchHint

public SearchHint SearchHint { get; set; }

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.

Property Value
Type Description
SearchHint

SearchText

public string SearchText { get; set; }

Required. The query text, which is used to generate an embedding according to the embedding model specified in the collection config.

Property Value
Type Description
string

TaskType

public EmbeddingTaskType TaskType { get; set; }

Required. The task type of the query embedding.

Property Value
Type Description
EmbeddingTaskType

TopK

public int TopK { get; set; }

Optional. The number of data objects to return.

Property Value
Type Description
int