Back to main page

$&

Concept:

$& expresses the boolean AND operation. To be specific, $& expresses the 'black box' version of the AND operation. With $& Aito uses the proposition's boolean condition as such in the statistical reasoning, instead of the proposition's internal components.

This makes the following clauses equivalent

{ "price" : {"$prop": { "$and" : [ {"$gte" : 0 },  {"$lte" : 100 } ] } } }
{ "price" : { "$&" : [ {"$gte" : 0 },  {"$lte" : 100 } ] } }

$& is especially useful with the numeric ranges.

With conditions, such as...

{"$&" : [{ "tags": "pen" },{ "price" : { "$gte" : 200 } } ] }

...you may want to use the $prop expression to get the same effect:

{"$prop" : { "tags": "pen", "price" : { "$gte" : 200 } } }

Format:

    { "$&" : [ Proposition, ... ] }

See also:

Example 1:

    { "$&" : [ { "price" : { "$gt" : 100 } }, { "tags" : "laptop" } ] }