Oracle ATG Web Commerce Search allows you to express arbitrary Boolean combinations of the index item constraints described previously. For example, to constrain a query to one of three document sets, you can construct a Boolean OR of three document set constraints; to constrain a query to documents with two property values, create a Boolean AND of two property constraints. To constrain a query to documents without a property value or not within a document set, a Boolean NOT of those constraints would be used.
The Backus Naur Form for the XML representation of the query constraint expressions is shown below.
expression := or_exp | and_exp | not_exp | set_exp | format_exp | type_exp
| doc_exp | date_exp | prop_exp | strprop_exp | numprop_exp ;
or_exp := "<or>" expression
+ "</or>" ;
and_exp := "<and>" expression
+ "</and>" ;
not_exp := "<not>" expression
+ "</not>" ;
set_exp := "<set subdirs=\"true|false\">" docset_path
"</set>"
format_exp := "<format>" format
"</format>"
type_exp := "<type>" file_suffix
"</type>"
doc_exp := "<doc>" URL
"</doc>"
date_exp := "<date op=\"num_op
\" >"date_string
"</date>"
prop_exp := "<prop type=\"type\" name=\"name
\" op=\"str_op
\" >"value
"</prop>"
strprop_exp := "<strprop name=\"name
\" op=\"str_op
\" >"value
"</strprop>"
numprop_exp := "<numprop name=\"name
\" op=\"num_op
\" >"value
"</numprop>"
format := html|text|pdf|other|xhtml|xml|all
date_string := YYYY|YY|MMYY|MMYYYY|MMDDYY|MMDDYYYY
date_string :=month
DD
YY
|YYYY
num_op := greater|greatereq|less|lesseq|equal|between|within
str_op :=
greater|greatereq|less|lesseq|equal|between|within|contains|starts|ends
An <or>
element represents a Boolean OR. The statement is true
if one of its contained expressions is true
, and otherwise evaluates to false
.
The <and>
element represents a Boolean AND, which is true
if all of its contained expressions are true
, and otherwise evaluates to false
.
The <not>
element represents a Boolean NOT, which is true
if none of its contained expressions are true
, and otherwise evaluates to FALSE
.