Using Logic Within a Query

Our search engine uses set logic instead of Boolean logic. Set logic provides the user a more understandable and powerful group of operations. In the search there are five types of sets:
  • A set of words or phrases (generally having the same meaning)
  • The set of patterns that match a wildcard expression
  • The set of quantities that match a specified value range
  • The set of patterns which approximate a given template (fuzzy set)
  • The set of patterns that match a given Regular Expression

Each set inherently 'OR-s' together all of its members. A concept search looks for "Middle East" OR "Kuwait" OR "Libya" OR "Saudi Arabia" if each is a member of the set "Middle East".

"AND" as Default Logic Within a Query

The default logic for more than one search item expressed in any query is to 'AND' together the 'OR-ed' members of each set.

If you enter the query: '#>10 brown cows', the program will search with the following Boolean logic equivalent:

( (11 or 12 or 13....) AND (cows OR cattle OR herd...) AND (amber OR auburn OR bay OR bronze OR chestnut OR chocolate OR cinnamon OR drab... ) ) WITHIN A SENTENCE.

"NOT" (-) Logic for Exclusion

If you wish to only find non-brown cows you may use the 'NOT' operator '-' in the form: '#>10 -brown cows'. This will result in the boolean equivalent of:

( ( ( 11 or 12 or 13....) AND ( cows OR cattle OR herd...) ) AND NOT ( amber OR auburn OR bay OR bronze OR chestnut OR chocolate OR cinnamon OR drab... ) ) WITHIN A SENTENCE

"OR" Logic

The equivalent to the Boolean 'OR' is available via two methods. The first (and most common) is to simply enter a word or phrase and let the Thesaurus build the list of OR-ed terms. The second method is to place the entire set of terms within parentheses separated by commas; i.e.: '(a,b,c)'. The advantage of using the Thesaurus method is that once you have built a set list you never have to do it again.

"X of Y" Logic

The 'X of Y' (permutation) operator has no Boolean counterpart, and is one of the more powerful benefits of set logic. Its purpose is to find sets of things in combination.

Let's say we want to find meetings between any three of the following people: Clinton, Foster, Myers, Yeltsin, Mubarak, and Dole. To phrase this as a query for our search engine you would simply type: "@2 Clinton Foster Myers Yeltsin Mubarak Dole". This means "Find 2 intersections of any of the sets." If we were to attempt that query in Boolean, we would be typing all day, and even then probably would never get there:

(Clinton AND Foster AND Myers) OR (Clinton AND Foster AND Yeltsin) OR (Clinton AND Foster AND Mubarak) OR (Clinton AND Foster AND Dole) OR (Clinton AND Foster AND Dole) OR (Clinton AND Yeltsin AND Myers) OR (Clinton AND Mubarak AND Myers) OR (Clinton AND Dole AND Myers) OR (AND ON AND ON.......)

"Mandatory" (+) Inclusion Logic

The '+' (Mandatory) operator is usually used in conjunction with the '@X' operator. It means "This set must be there". For example, if we wanted to know if "Clinton" met with any two of the other people in the last example, we would enter the query: "+Clinton @1 Foster Myers Yeltsin Mubarak Dole". So "Clinton" must be there, along with 1 intersection of any 2 of the other choices we listed.

More commonly, you'd want to designate one item that has to be there with a '+' , and see that it is found occurring along with a choice of some other items, where no intersections (@0) of those are required. Like the query: "+Washington @0 politics economics education" . This would find ideas matching either politics or economics or education in Washington.

Examples:

john marsha
finds: John AND Marsha
~bush ~growing -george
finds: (Any meaning of: bush) AND (Any meaning of: growing) AND NOT George
software sales -~microsoft
software AND sales AND NOT (Any meaning of: Microsoft)
+~transfer +~stock +#>0<1 @1 ibm motorola microsoft dell compaq
(All meanings of: transfer) AND (All meanings of: stock) AND (All quantities that represent positive fractions) AND (ANY TWO OF: ibm, motorola, microsoft, dell, compaq )