All Products
Search
Document Center

Tablestore:TermsQuery

Last Updated:May 09, 2024

TermsQuery specifies the configurations of a terms query. This query is similar to a term query. A terms query supports multiple terms. A row of data is returned if at least one of the keywords matches the field value. Terms queries can be used in the same manner as the IN operator in SQL statements.

Data structure

message TermsQuery {
    optional string field_name = 1;
    repeated bytes terms = 2;
    optional float weight = 3;
}

Parameter

Type

Required

Description

field_name

string

Yes

The name of the attribute column.

terms

bytes

Yes

The keywords that are used to match the field values when you perform a terms query. The value must be encoded by using PlainBuffer. For more information, see PlainBuffer. You can specify up to 1,024 keywords.

A row of data is returned if at least one of the keywords matches the value of the column.

weight

float

No

The weight configurations of the query condition.