Oracle ATG Web Commerce Search represents index item metadata as properties stored with the index item. During a query, Oracle ATG Web Commerce Search can restrict its search to items with certain property values. Numeric property values can be tested for equality, less-than, and greater-than; string property values can test for sub-string matches; and both types can be tested for range matches. The XML representation for these constraints is:
<prop type="type
" name="name
" op="str_op|num_op
" case="true|false">value
</prop>
<strprop name="name
" op="str_op
" case="true|false">value
</strprop>
<numprop name="name
" op="num_op
" >value
</numprop>
The constraints are:
type
—One of six possible property types,enum
,string
,float
,integer
,boolean
anddate
. Note that for properties of typeboolean
, the value must be provided as a 1 or 0. For example:<prop type="boolean" name="onSale">1</prop>
The
strprop
constraint is equivalent to the type values ofenum
andstring
, and thenumprop
constraint is equivalent to the other four type values.name
—The name of the property.value
—The operand value for the constraint.op
—Contains the comparative operator for the constraint, which defaults toequal
.
All constraints allow the following operators:
equal
—The index item must have a property value equal to the operandgreater
—The index item must have a property value greater than the operandgreatereq
—The index item must have a property value greater than or equal to the operandless
—The index item must have a property value less than the operandlesseq
—The index item must have a property value less than or equal to the operandgreater-less
—The index item must have a property value greater than the initial range value and less than the final range value, where the range operand is expressed as initial-final.greatereq-lesseq
—The index item must have a property value greater than or equal the initial range value and less than or equal the final range value, where the range operand is expressed as initial-final.greatereq-less
—The index item must have a property value greater than or equal the initial range value and less than the final range value, expressed as initial-final.greater-lesseq
—The index item must have a property value greater than the initial range value and less than or equal to the final range, where the range operand is expressed as initial-final.
For string
and enum
property constraints, the comparisons are character byte comparisons. In addition, the enum
and string
property constraints allow three more operators:
contains
—The index item must have a property value that contains the operandstarts
—The index item must have a property value that starts with the operandends
—The index item must have a property value that ends with the operand
For string
property constraints, the additional case
attribute controls whether the operator should be case-sensitive (true
) or case-insensitive (false
). If the operator is a range operator, then the value
is a range of values expressed as initial-final.