We implement the or operation by computing the union, S1 ∪ S2 ∪ · · · ∪ Sn, of the sets.
The not operation finds documents that do not contain a specified keyword Ki .
Given a set of document identifiers S, we can eliminate documents that contain
the specified keyword Ki by taking the difference S − Si, where Si is the set of
identifiers of documents that contain the keyword Ki .