|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
bq parameter enables you to combine matches against fields using the Boolean operators and, or, and not. When constructing Boolean search queries, you use parentheses to control the order of evaluation of the expression. When part of an expression is enclosed in parentheses, that part is evaluated first. The resulting value is used in the evaluation of the remainder of the expression. At a minimum, the entire expression must be enclosed in a single set of parentheses.
For example, to search the title field for matches that either contain the string "star" or do not contain the string "wars":
search?bq=(or title:'star' (not title:'wars'))
You can use and, or, and not at the field level, and still use the
| operators within the match expressions. For example, the following queries produce the same results:
search?bq=(or title:'star' title:'-wars') search?bq=(or title:'star' (not title:'wars'))
For more information about using Boolean operators in match expressions, see Using Boolean Operators in Amazon CloudSearch Text Searches.
You can construct Boolean search queries to combine searches against multiple fields. For example:
search?bq=(and title:'star' genre:'drama')
If you don't get the results you expect from a search request, check the
match-expr in the response to see how Amazon CloudSearch parsed the match expression specified in the