帮助文档 Logo
平台使用
阿里云
百度云
移动云
智算服务
教育生态
登录 →
帮助文档 Logo
平台使用 阿里云 百度云 移动云 智算服务 教育生态
登录
  1. 首页
  2. 阿里云
  3. 表格存储
  4. 开发参考
  5. API参考(数据管理)
  6. DataType定义
  7. MatchQuery

MatchQuery

  • DataType定义
  • 发布于 2025-04-22
  • 0 次阅读
文档编辑
文档编辑

表示匹配查询配置。匹配查询采用近似匹配的方式查询表中的数据。

数据结构

message MatchQuery {
    optional string field_name = 1;
    optional string text = 2;
    optional int32 minimum_should_match = 3;
    optional QueryOperator operator = 4;
    optional float weight = 5;
}

名称

类型

是否必选

描述

field_name

string

是

要匹配的列。

匹配查询可应用于Text类型。

text

string

是

查询关键词,即要匹配的值。

当要匹配的列为Text类型时,查询关键词会被分词成多个词,分词类型为创建多元索引时设置的分词器类型。如果创建多元索引时未设置分词器类型,则默认分词类型为单字分词。

例如当要匹配的列为Text类型时,分词类型为单字分词,则查询词为"this is",可以匹配到“...,this is tablestore”、“is this tablestore”、“tablestore is cool”、“this"、“is”等。

minimum_should_match

int32

否

最小匹配个数,必须与逻辑运算符OR配合使用。

只有当某一行数据的field_name列的值中至少包括最小匹配个数的词时,才会返回该行数据。

operator

QueryOperator

否

查询操作符。取值范围为逻辑运算符AND和OR。默认值为OR,表示当分词后的多个词只要有部分匹配时,则行数据满足查询条件。

weight

float

否

查询条件的权重配置。

相关文章

ActionType 2025-04-22 14:32

在GetStreamRecord的响应消息中表示操作类型。 枚举取值列表

Aggregation 2025-04-22 14:32

表示单个统计聚合配置。 数据结构 message Aggregation { optional string name = 1; optional AggregationType type = 2;

AggregationResult 2025-04-22 14:32

表示单个统计聚合Aggregation的返回信息。 数据结构 message AggregationResult { optional string name = 1; optional Aggregatio

Aggregations 2025-04-22 14:32

表示统计聚合配置。 数据结构 message Aggregations { repeated Aggregation aggs = 1; }

AggregationsResult 2025-04-22 14:32

表示统计聚合中Aggregation的返回信息。 数据结构 message AggregationsResult { repeated AggregationResult agg_results = 1; }

AggregationType 2025-04-22 14:32

表示统计聚合类型。 枚举取值列表 AGG_AVG表示求平均值。 AGG_DISTINCT_COUNT表示去重统计行数,

目录
Copyright © 2025 your company All Rights Reserved. Powered by 博智数字服务平台.
闽ICP备08105208号-1