Application implementers use FQL to express criteria for searching. A typical scenario for using FQL is an application that enables users to search for items and browse results.
An FQL expression consists of search tokens and operators. A search token consists of a value or range of values to search for, and an operator specifies how to include, exclude, and rank the search results. Examples of operators include and, andnot, or, not, and near.
The and operator applies when the user wants items that match all operands.
A search query that uses the andnot operator returns items that match only the first operand, and it excludes items that match subsequent operands.
An or operator expression returns items that match any of the operands.
The not operator excludes items that match the operand.
The near operator matches items based on the proximity of indexed tokens that match the operands.
An FQL expression can just consist of either a single search token or a single operator expression. Many operators can also accept FQL expressions as operands, which permits FQL expressions to be nested.