AND operator
The AND operator matches documents where both terms exist anywhere in the text of a single document.
You can also use two adjacent ampersands (&&) instead of AND.
If the query_default_operator index parameter is set to AND, the AND operator is assumed if you do not specify a Boolean operator between two terms.
The following search predicates search for documents that contain
both the word UNIX
and the phrase operating
system
:
bts_contains(column, ' UNIX AND "operating system" ')
bts_contains(column, ' UNIX && "operating system" ')
The following search predicates search XML
data for documents that contain both the word travel
in
the book
field and the word stewart
in
the author
field:
bts_contains(column, ' book:travel AND author:stewart ')
bts_contains(column, ' book:travel && author:stewart ')
The following search predicate searches for
documents that contain both the word travel
in the book
field
and the phrase john stewart
in the author
field:
bts_contains(column, ' book:travel AND author:"john stewart" ')