All Products
Search
Document Center

Tablestore:PrefixQuery

Last Updated:May 09, 2024

PrefixQuery specifies the configurations of a prefix query. You can use the prefix query feature to query data that matches a specific prefix. If the field used to match the prefix is a TEXT field, the field values are tokenized. A row meets the query conditions when at least one token contains the specified prefix.

Data structure

message PrefixQuery {
    optional string field_name = 1;
    optional string prefix = 2;
    optional float weight = 3;
}

Parameter

Type

Required

Description

field_name

string

Yes

The name of the attribute column.

prefix

string

Yes

The prefix that is used to match the value of the column when you perform a prefix query.

If the field used to match the prefix is a TEXT field, the field values are tokenized. A row meets the query conditions when at least one token contains the specified prefix.

weight

float

No

The weight configurations of the query condition.