The importContent command enables you to configure index attributes by importing into the ECR a JSON document stored on your local file system. A JSON document can configure dimensions, properties, or derived properties.
Index attribute configuration is stored in a hierarchy of folders in the IFCR.
The root folder of this hierarchy,
/attributes
, must contain the parameter
"ecr:type": "attributes-folder"
. All other folders
must be subfolders of
/attributes
. Every subfolder of
/attributes
must contain the parameter
"ecr:type": "attributes-owner-folder"
.
The following diagram illustrates the IFCR folder hierarchy for index attribute configuration:
Commonly, the /attributes and /system folders are configured automatically when your Guided Search application is initialized. The contents of the Catalog owner subfolder are overwritten whenever the Catalog administrator publishes Catalog content.
For more information about the ownership of index attributes, see Understanding ownership of index attributes.
The following sections describe how to configure the IFCR hierarchy and create index attribute configuration under individual owners.
If the /attributes folder was not configured when your Guided Search application was initialized, you must configure it before you create configuration for individual owners, as follows:
{ "ecr:type": "attributes-folder" }
Specify this configuration in a file named
_.json
, which you then import into the IFCR
/attributes
folder. To import this configuration
locally, run a command of the following form:
runcommand.bat IFCR importContent attributes C:\endeca\apps\appName\config\import\attributes
where:
To import this configuration remotely, use a POST request of the following form:
POST http://host:port/ifcr/gsadmin/v1/Discover/attributes
If the
/system
folder was not configured when your Guided
Search application was initialized, you must configure it before you create
configuration for individual owners, as follows:
{ "ecr-type": "attributes-owner-folder", "common.record_type" : { "displayOrder" : 18, "jcr:primaryType" : "endeca:dimension" }, "common.id" : { "propertyDataType" : "ALPHA", "jcr:primaryType" : "endeca:property", "isRecordFilterable" : true } }
Note
The default version of
/system
used by the Discover reference application
provided with Guided Search contains all the index attribute configuration used
by this application. If you are developing your own Guided Search application
based on Discover, replace the default contents of
/system
with the content shown in the example
immediately above. Then create index attribute configuration for your Guided
Search application under a separate owner or owners that you create.
Specify this configuration in a file named
_.json
, which you then import into the IFCR
/system
folder. To import this configuration, run a
command of the following form:
runcommand.bat IFCR importContent attributes/system C:\endeca\apps\appName\config\import\attributes\system
where:
To import this configuration remotely, use a POST request of the following form (For information about how to specify the configuration to be imported in JSON format and in ZIP format, see Understand ZIP format and JSON format (remote access only):
POST http://host:port/ifcr/gsadmin/v1/Discover/attributes/system
You must create a subfolder of the IFCR
/attributes
folder for each individual owner of index
attribute configuration.
The JSON document containing the configuration for an individual owner
must include the
"ecr:type": "attributes-owner-folder"
parameter. For
example, the following JSON document configures a dimension for an individual
owner:
{ "ecr:type" : "attributes-owner-folder", "camera.operating_temperature_range_t-t" : { "propertyDataType" : "ALPHA", "ecr:type" : "property", "sourcePropertyNames" : [ "camera.Operating temperature range (T-T)" ] }, "camera.video_capability" : { "displayOrder" : 7, "ecr:type" : "dimension", "isAutogen" : true, "sourcePropertyNames" : [ "camera.Video capability" ] }, "camera.optical_sensor_size" : { "propertyDataType" : "ALPHA", "ecr:type" : "property", "sourcePropertyNames" : [ "camera.Optical sensor size" ] } }
To import this configuration, run a command of the following form:
runcommand.bat IFCR importContent attributes/ownerName C:\endeca\apps\appName\config\import\attributes\ownerName
where:
attributes/ownerName
is the folder that will contain the index configuration belonging to the new owner.C:\endeca\apps\appName\config\import\attributes\ownerName
is a suggested pathname of the folder in your local file system that contains the_.json
file of index attribute configuration. Do not specify the name of the file itself.
To import this configuration remotely, use a POST request of the following form (For information about how to specify the configuration to be imported in JSON format and in ZIP format, see Understand ZIP format and JSON format (remote access only):
POST http://host:port/ifcr/gsadmin/v1/Discover/attributes/owner-name
You can also use the IFCR importContent command to import configuration into existing index configuration in the ECR. The imported configuration replaces the existing configuration in the ECR.
To import configuration into an existing index, use the same command, syntax, and JSON content that you use to configure a new index.
To replace existing index attribute configuration remotely, use a PUT request of the following form (For information about how to specify the configuration to be imported in JSON format and in ZIP format, see Understand ZIP format and JSON format (remote access only):
PUT http://host:port/ifcr/gsadmin/v1/Discover/attributes
To modify existing index attribute configuration remotely, use a PATCH request of the following form.
PATCH http://host:port/ifcr/gsadmin/v1/Discover/attributes
A PATCH request can modify index configuration by adding attributes or changing the value of existing attributes.
For information about how to specify the configuration to be imported in JSON format and in ZIP format, see Understand ZIP format and JSON format (remote access only).