public sealed class TextSearch : IMessage<TextSearch>, IEquatable<TextSearch>, IDeepCloneable<TextSearch>, IBufferMessage, IMessageReference documentation and code samples for the Vector Search v1 API class TextSearch.
Defines a text search operation.
Implements
IMessageTextSearch, IEquatableTextSearch, IDeepCloneableTextSearch, IBufferMessage, IMessageNamespace
Google.Cloud.VectorSearch.V1Assembly
Google.Cloud.VectorSearch.V1.dll
Constructors
TextSearch()
public TextSearch()TextSearch(TextSearch)
public TextSearch(TextSearch other)| Parameter | |
|---|---|
| Name | Description |
other |
TextSearch |
Properties
DataFieldNames
public RepeatedField<string> DataFieldNames { get; }Optional. The data field names to search. Required when using the default text search mode.
| Property Value | |
|---|---|
| Type | Description |
RepeatedFieldstring |
|
Filter
public Struct Filter { get; set; }Optional. A JSON filter expression, e.g. {"genre": {"$eq": "sci-fi"}},
represented as a google.protobuf.Struct.
An empty filter ({}) matches all data objects. Otherwise, each JSON
object in the filter must have exactly one key: either a field name mapped
to one operator ({"price": {"$lt": 100}}), or a logical operator: $and
or $or with a list of filters, or $not with one filter. Field
operators and their values: $eq and $ne take a string, number or bool;
$lt, $lte, $gt and $gte take a number; $in, $nin and $all
take a list of strings; $exists takes a bool. Several keys in one object
(implicit AND) and implicit equality ({"genre": "sci-fi"}) are rejected;
use $and and $eq instead.
Logical operators can be nested at most 2 levels deep, e.g.
{"$and": [{"$or": [{"a": {"$eq": 1}}, {"b": {"$eq": 2}}]}]}. Deeper
filters are rejected with INVALID_ARGUMENT.
| 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 |
|
SearchText
public string SearchText { get; set; }Optional. The query text. Required when using the default text search mode.
| Property Value | |
|---|---|
| Type | Description |
string |
|
StructuredQuery
public StructuredQuery StructuredQuery { get; set; }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.
| Property Value | |
|---|---|
| Type | Description |
StructuredQuery |
|
TopK
public int TopK { get; set; }Optional. The number of results to return.
| Property Value | |
|---|---|
| Type | Description |
int |
|