Records are tagged with dimension values in either of two ways, depending on whether the dimension values belong to an automatically generated flat dimension or to a hierarchical dimension.
Flat dimensions are configured by JSON attributes that contain the parameters shown in the following example:
"camera_video_capability": { "ecr:type" : "dimension", "displayOrder":7, "isAutogen" : true, "sourcePropertyNames" : ["camera.Video capability"] },
where:
"camera.video_capability
" is the name of the flat dimension."ecr:type": "dimension"
indicates that this attribute configures a dimension rather than a property."isAutogen": true
indicates that this is an automatically generated flat dimension."sourcePropertyNames" : [ "camera.video capability" ]
specifies a source record property whose value in the different source records will become different dimension values in the flat dimension.
Tagging is thus controlled by the last of the properties shown in the
example above,
sourcePropertyNames
. The value or values of this
parameter specify source record properties whose values will become dimension
values in the flat dimension configured by this attribute (in this example,
camera_video_capability
).
When a dimension value is created based on a record property, that
record is automatically tagged to the new dimension value. For example, if a
source record has a property named
camera.Video capability
whose value is
"slow
", a dimension value named "slow
" will
be added to the dimension
camera_video_capability
, and the record will be tagged
to this dimension value.
If no record has a value in any of the properties specified by
sourcePropertyName
, no dimension is generated.
For non-range hierarchical dimensions, a product data record is tagged
with a dimension value if the value of the record's
sourcePropertyNames
property matches the value of the
dimval.spec
attribute of a dimension value configured
in
rs_baseline_dimvals.xml
. The matching is
case-sensitive.
For example, the following attribute of a JSON document specifies that
if a record has a property named
camera.Megapixel
, the value of that property will be
matched against the values of the
dimval.spec
parameters of the dimension values in the
dimension
camera.megapixel_range
:
"camera.megapixel_range" : { "displayOrder" : 16, "ecr:type" : "dimension", "sourcePropertyNames" : [ "camera.Megapixel" ] }
For example, if a dimension value's
dimval.spec
property is set to "Eight" as follows:
<PROP NAME="dimval.spec"> <PVAL>Eight</PVAL> </PROP>
then a product data record is tagged with this dimension value if its
camera.Megapixel
property is also set to "Eight". Note
that matching is case-sensitive; thus, if the
camera.Megapixel
property is set to
"eight
", it does not match the dimval.spec
property and so is not tagged to this dimension value.
Note
A dimension value's
dimval.spec
property must be set to a value that is
unique within its dimension.
A product data record is tagged with a range dimension value if the
value of the record's property specified by
sourcePropertyNames
falls within the range specified
by the dimension value's
dimval.range
.upper_bound
and
dimval.range.lower_bound
properties. In this case, the
dimval.spec
is only used internally to differentiate
between the different values.
Note
The
dimval.range
.upper_bound
and
dimval.range.lower_bound
properties are specified in
the
rs_baseline_dimvals.xml
file.
A range dimension value can be any of the following data types: ALPHA, INTEGER, FLOAT, DOUBLE, or DATETIME.
The following example shows how an Endeca product data record is
tagged to the range dimension value
camera.megapixel_range:20 - 28
in a dimension named
camera.megapixel_range
:
Note
If you do not specify an upper boundary (that is, if you omit
dimval.range.upper_bound
), the upper boundary is
infinity. Upper and lower boundaries are exclusive by default.
If you are dealing with a large set of product data records, you may choose not to tag all these records with dimension values. Untagged records will not appear in refinements lists.
Note
Untagged records can be accessed by record search. To make records accessible through record search, however, you must configure them to be searchable. For more information, see Configuring dimensions and properties in JSON format.