Composing search expressions
549
The following example uses an evidence operator:
<cfsearch name = "quick_search"
collection="bbb"
type = "explicit"
criteria="<WORD>film">
Proximity operators
Proximity operators specify the relative location of specific words in the document. To retrieve a
document, the specified words must be in the same phrase, paragraph, or sentence. In the case of
NEAR and NEAR/N operators, retrieved documents are ranked by relevance based on the
proximity of the specified words. Proximity operators can be nested; phrases or words can appear
within SENTENCE or PARAGRAPH operators, and SENTENCE operators can appear within
PARAGRAPH operators.
The following table describes the proximity operators:
Operator
Description
Example
NEAR
Selects documents containing specified search
terms. The closer the search terms are to one
another within a document, the higher the
document’s score. The document with the
smallest possible region containing all search
terms always receives the highest score.
Documents whose search terms are not within
1000 words of each other are not selected.
war <NEAR> peace
retrieves
documents that contain
stemmed variations of these
words within close proximity to
each other (as defined by
Verity). To control search
proximity, use NEAR/N.
NEAR/N
Selects documents containing two or more
search terms within N number of words of each
other, where N is an integer between 1 and 1024.
NEAR/1 searches for two words that are next to
each other. The closer the search terms are within
a document, the higher the document's score.
You can specify multiple search terms using
multiple instances of NEAR/N as long as the
value of N is the same.
commute <NEAR/10> bicycle
<NEAR/10> train <NEAR/10>
retrieves documents that
contain stemmed variations of
these words within 10 words of
each other.
PARAGRAPH
Selects documents that include all of the words
you specify within the same paragraph. To search
for three or more words or phrases in a paragraph,
you must use the PARAGRAPH operator
between each word or phrase.
<PARAGRAPH> (mission, goal,
statement)
retrieves documents
that contain these terms within
a paragraph.
PHRASE
Selects documents that include a phrase you
specify. A phrase is a grouping of two or more
words that occur in a specific order.
<PHRASE> (mission, oak)
returns documents that contain
the phrase mission oak.
SENTENCE
Selects documents that include all of the words
you specify within the same sentence.
<SENTENCE> (jazz, musician)
returns documents that contain
these words in the same
sentence.
IN
Selects documents that contain specified values
in one or more document zones. A document
zone represents a region of a document, such as
the document’s summary, date, or body text. To
search for a term only within the one or more
zones that have certain conditions, you qualify the
IN operator with the WHEN operator.
Chang <IN> author
searches
document zones named author
for the word Chang.
Summary of Contents for COLDFUSION MX 61-DEVELOPING COLDFUSION MX
Page 1: ...Developing ColdFusion MX Applications...
Page 22: ...22 Contents...
Page 38: ......
Page 52: ...52 Chapter 2 Elements of CFML...
Page 162: ......
Page 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Page 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Page 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Page 266: ......
Page 314: ...314 Chapter 14 Handling Errors...
Page 344: ...344 Chapter 15 Using Persistent Data and Locking...
Page 349: ...About user security 349...
Page 357: ...Security scenarios 357...
Page 370: ...370 Chapter 16 Securing Applications...
Page 388: ...388 Chapter 17 Developing Globalized Applications...
Page 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Page 410: ......
Page 426: ...426 Chapter 19 Introduction to Databases and SQL...
Page 476: ...476 Chapter 22 Using Query of Queries...
Page 534: ...534 Chapter 24 Building a Search Interface...
Page 556: ...556 Chapter 25 Using Verity Search Expressions...
Page 558: ......
Page 582: ...582 Chapter 26 Retrieving and Formatting Data...
Page 668: ......
Page 734: ...734 Chapter 32 Using Web Services...
Page 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Page 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Page 788: ......