DISCO’s search engine goes down the precedence list of the four search term connectors:
- Proximity: /
- AND and NOT: & %
- OR: [space]
one by one, evaluating all of the terms using the connectors at that level, and then moving on to terms using connectors at the next level. A term is the single word or phrase (in quotes) on either side of the connector. A connector is one of our search operators that requires terms to be on both sides of the connector, i.e. proximity, AND, NOT, and OR. At level 2, AND and NOT are evaluated in order from left to right, since they both have the same level of precedence.
ken % (lay & (enron contract))
Here we have an example of nested parentheses, meaning a set of parentheses inside another set. Notice that the number of opening parentheses (2) should exactly match the number of closing parentheses (also 2). We always start with the deepest set of parentheses, so we will evaluate enron OR contract first.
We next work our way out to the next set of parentheses, and can think of the remaining search inside the parentheses as lay & [first search's resulting documents],meaning any of the 310,682 documents from our first step that also contain the word lay, giving us 11,442 documents.
Finally, having taken care of all of the terms and connectors in parentheses, we go back to our default precedence rules (only one connector left, a level 2 %),and we can think of the remaining search as ken % [11,442 documents] meaning all documents that contain contain the word ken, but excluding (NOT) the 11,442 documents found previously, which returns a total 4,189 documents in the Enron demo.