TO Operator

The TO operator allows you to search for occurrences of a term or query falling between two other terms or queries.

Syntax

Semantics

Recommended use

left_query TO right_query {sub_query}

Where the sub_query is only retrieved if it falls between the left_ and right_query. The left_ and right_query can be a term or phrase. Negated queries are not allowed. For example, 'apple pie' is allowed, but 'NOT(apple) pie' is not allowed.

This method of searching can be very helpful in files with an accepted standard, such as letters, memos, proposals, contracts, invoices, etc.


Examples

Example of query

Results

dear TO sincerely {John}

'John'

Only 'John' is highlighted, dear and sincerely function as start and end delimiters.

(dear OR hello OR hi) TO (sincerely OR regards OR faithfully OR greetings) {John}

Error

The left_ and right_queries are not terms or phrases.

left TO right {sub}

For text 'left sub left right', no match is returned.

For text 'left sub right left', one instance of 'sub' is found.

For text 'left sub sub right left', two instances of 'sub' are found.

For text 'left sub right sub right left', the first instance of 'sub' is found.

For text 'left sub left sub left sub right', the last instance of 'sub' is found.

For text 'right sub left', no match is returned.

experience TO EOP {(driver OR chauffeur) and (>= 3)}

Locates resumes of persons with a minimum of three years' experience as a driver.

EOP TO EOP {economic AND policy}

Searches for a paragraph in the whole document which contains both economic and policy.