## Applying Search Logic

Texis and Metamorph - the search software underlying the Appliance - use set logic for text queries. The default behavior of the search is to locate an intersection (i.e. "AND") of every element within a query. This means that the query: "microsoft bob interface" is the equivalent to the boolean query: "microsoft AND bob AND interface". The operators below modify this behavior:

- (without)
The `-` (minus) is the most commonly used logic symbol. It means the results must exclude those with that item.
+ (mandatory)
The `+` (plus) symbol in front of a search item means that the results must include that item. This is generally used in conjunction with the intersection (`@`) operator.
@N (intersections)
The `@` sign followed by a number indicates how many intersections to locate of the other terms in the query (those without `-` or `+`). \$N\$ intersections means that at least \$N+1\$ distinct query terms must be present. This may be confusing at first, but it is powerful, as it enables arbitrary "partial" matches and combinations.

 Query Finds `bob sam joe` Bob with Sam and Joe `bob sam -joe` Bob with Sam without Joe `bob sam joe @1` Bob with Sam, or Bob with Joe, or Joe with Sam `A B C D @1` A B or A C or A D or B C or B D or C D `A +B C D @0` B and any of (A C or D) `A B C -D @1` (A B or A C or B C) without D

Table 8.2: Search Logic Examples

The plus (`+`) and minus (`-`) operators must immediately prefix the term to which they apply. There must be a space between the operator and any preceding term.

 Correct Incorrect `bob +sam -joe` `bob + sam - joe` `bob+sam-joe`

Note that instead of a single keyword, each term above could also be an entire set of things, or any of the special pattern matchers (e.g. REX). Such a set is present (as a term for search logic purposes) if any of its listed items match - just as a plain keyword is present if any of its suffix forms match (depending on Word Forms, here)).

Specific lists of words are given within parentheses, separated by commas (with no spaces). For example: "(bob,joe,sam)" would match any of those words (without suffix processing). Logic operators apply to the entire set; thus "(bob,robert,bobby) sue (elizabeth,liz,beth) @1 +(red,green,blue)" would require (`+`) any of "red", "green", or "blue", and any two (`@1`) of Bob, Sue or Elizabeth - by any of their synonymous names.