BoolQuery specifies the Boolean query configuration. You can use this feature to query the rows based on one or more subqueries. Tablestore returns the rows that match the subqueries. Each subquery can be of any type, including Boolean query.
Data structure
message BoolQuery {
repeated Query must_queries = 1;
repeated Query must_not_queries = 2;
repeated Query filter_queries = 3;
repeated Query should_queries = 4;
optional int32 minimum_should_match = 5;
}
Parameter | Type | Required | Description |
must_queries | repeated Query | No | The list of subqueries that the query results must match. This parameter is equivalent to the AND operator. |
must_not_queries | repeated Query | No | The list of subqueries that the query results must not match. This parameter is equivalent to the NOT operator. |
filter_queries | repeated Query | No | The list of subqueries. Only rows that match all subfilters are returned. A filter is similar to a query except that a filter does not calculate the relevance score based on the number of filter_queries that the row matches. |
should_queries | repeated Query | No | The list of subqueries that the query results can or cannot match. This parameter is equivalent to the OR operator. Only rows that meet the minimum number of subquery conditions specified by should_queries are returned. A higher overall relevance score indicates that more subquery conditions specified by should_queries are met. |
minimum_should_match | int32 | No | The minimum number of subquery conditions specified by should_queries that the rows must meet. If no other subquery conditions except the subquery conditions that are specified by should_queries are specified, the default value of this parameter is 1. If other subquery conditions, such as subquery conditions specified by must_queries, must_not_queries, and filter_queries are specified, the default value of this parameter is 0. |