You configure
Endeca records and properties in a file named
index-config.json. A version of
index-config.json is provided with the Discover
Electronics reference application in the
installation-directory\Discover\config\index_config
folder. You can edit this version as required by your application.
The
index-config.json file consists of a series of
attributes, each of which specifies either a dimension or a property, depending
on the value of the attribute's "jcr:primaryType" parameter
(either
"endeca:dimension",
"endeca:property", or
"endeca:derivedProperty").
The attributes have various parameters, such as
propertyDataType,
displayOrder,
isAutoGen. For information about these and other
supported parameters, see
Parameters of dimensions
and properties in index-config.json .
The following excerpt from the
index-config.json file provided with the Discover
Electronics application illustrates attributes that configure properties or
dimensions:
{
"indexConfig" : {
"system" : {
"attributes" : {
"camera.operating_temperature_range_t-t" : {
"propertyDataType" : "ALPHA",
"jcr:primaryType" : "endeca:property",
"sourcePropertyNames" : [ "camera.Operating temperature range (T-T)" ]
},
"product.min_price" : {
"derivedPropertyFunction" : "MIN",
"jcr:primaryType" : "endeca:derivedProperty",
"derivedPropertySource" : "product.price"
},
"camera.video_capability" : {
"displayOrder" : 7,
"jcr:primaryType" : "endeca:dimension",
"isAutogen" : true,
"sourcePropertyNames" : [ "camera.Video capability" ]
},
"camera.megapixel_range" : {
"displayOrder" : 16,
"jcr:primaryType" : "endeca:dimension",
"rangeComparisonType" : "FLOAT",
"sourcePropertyNames" : [ "camera.Megapixel" ]
},
. . .This excerpt configures:
an Endeca record property named
camera.operating_temperature_range_t-tan Endeca record derived property named
product.min_price. For information about this type of property, see Configuring aggregated records and derived properties.a flat (automatically generated) dimension named
camera.video_capability
For example, suppose that source data records in your product data record store have the following properties:
camera.sensor_megapixels camera.lens_focal_length camera_type camera_weight
You want to produce Endeca records that have the following simplified names for these properties, omitting the property for the camera's weight:
megapixels focal length type
To map these source record properties to Endeca properties, add the
following attributes to
index-config.json:
"megapixels" : {
"propertyDataType" : "ALPHA",
"jcr:primaryType" : "endeca:property",
"sourcePropertyNames" : [ "camera.sensor_megapixels" ]
},
"focal length" : {
"propertyDataType" : "ALPHA",
"jcr:primaryType" : "endeca:property",
"sourcePropertyNames" : [ "camera.lens_focal_length" ]
},
"type" : {
"propertyDataType" : "ALPHA",
"jcr:primaryType" : "endeca:property",
"sourcePropertyNames" : [ "camera_type" ]
}, Note
You do not map the
camera_weight property, because you do not want the
indexed Endeca records to have this property.
Given this property mapping, indexing a source data record with the following properties and property values:
camera.sensor_megapixels: 24.2 camera.lens_focal_length: 18-55mm camera_type: digital camera_weight: 450g
will produce an Endeca record with the following properties and property values:
megapixels: 24.2 focal length: 18-55mm type: digital

