Use Product Advisor search-space synchronization
To use Product Advisor search-space synchronization:
- Create an XML configuration-information file for the synchronization named "PASyncInfo.xml."
- In PASyncInfo.xml, specify PASync.xsd as the XML schema to be used. For example:
<PASync xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation='PASync.xsd'The PASync.xsd file is provided. The following text shows the contents of PASync.xsd:
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'> <xsd:element name="PASync"> <xsd:complexType> <xsd:sequence> <xsd:element ref="SearchScheme" /> <xsd:element ref="Command" minOccurs="1" maxOccurs="unbounded" /> </xsd:sequence> <xsd:attribute name = "member" type="xsd:string" use="required" /> <xsd:attribute name = "store" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> <xsd:element name="SearchScheme"> <xsd:complexType> <xsd:sequence> <xsd:element ref="RelatedTable" /> <xsd:element ref="Search" minOccurs="1" maxOccurs="unbounded" /> </xsd:sequence> <xsd:attribute name = "tableName" type="xsd:string" use="required" /> <xsd:attribute name = "primary" type="xsd:string" use="required" /> <xsd:attribute name = "colName" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> <xsd:element name="RelatedTable"> <xsd:complexType> <xsd:attribute name = "tableName" type="xsd:string" use="required" /> <xsd:attribute name = "from" type="xsd:string" use="required" /> <xsd:attribute name = "to" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> <xsd:element name="Search"> <xsd:complexType> <xsd:attribute name = "value" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> <xsd:element name="Command"> <xsd:complexType> <xsd:attribute name = "tableName" type="xsd:string" use="required" /> <xsd:attribute name = "idColumnName" type="xsd:string" use="required" /> <xsd:attribute name = "addCommand" type="xsd:string" /> <xsd:attribute name = "updateCommand" type="xsd:string" /> <xsd:attribute name = "deleteCommand" type="xsd:string" /> </xsd:complexType> </xsd:element> </xsd:schema>- In PASyncInfo.xml, specify the member ID and store-entity ID for which the synchronization needs to be done. For example:
member = "-2000" store = "10351"- Under the search-scheme element in PASyncInfo.xml, specify the CATGROUP identifiers that make up the search space. For example:
<SearchScheme tableName = "catgroup" primary = "CATGROUP_ID" colName = "identifier" > <RelatedTable tableName = "catgpenrel" from = "CATGROUP_ID" to = "CATENTRY_ID" /> <Search value="Pants" /> <Search value="Shirts" /> </SearchScheme>"Pants" and "Shirts" are specified in the example. You can specify as many CATGROUP identifiers as you want.
- In PASyncInfo.xml, specify attributes to determine what commands to schedule. For example:
<Command tableName = "CATENTRY" idColumnName = "CATENTRY_ID" updateCommand = "UpdateSearchSpaces" deleteCommand = "RemoveProductsFromAllSearchSpaces" /> <Command tableName = "CATENTDESC" idColumnName = "CATENTRY_ID" addCommand = "UpdateSearchSpaces" updateCommand = "UpdateSearchSpaces" deleteCommand = "UpdateSearchSpaces" /> <Command tableName = "LISTPRICE" idColumnName = "CATENTRY_ID" addCommand = "UpdateSearchSpaces" updateCommand = "UpdateSearchSpaces" deleteCommand = "UpdateSearchSpaces" /> <Command tableName = "ATTRVALUE" idColumnName = "CATENTRY_ID" addCommand = "UpdateSearchSpaces" updateCommand = "UpdateSearchSpaces" deleteCommand = "UpdateSearchSpaces" /> <Command tableName = "CATENTATTR" idColumnName = "CATENTRY_ID" addCommand = "UpdateSearchSpaces" updateCommand = "UpdateSearchSpaces" deleteCommand = "UpdateSearchSpaces" /> <Command tableName = "CATGPENREL" idColumnName = "CATENTRY_ID" addCommand = "AddProductsToSearchSpace" deleteCommand = "RemoveProductsFromSearchSpace" /> </PASync>- Create a new massload utility customizer property file.
(AIX)(Linux)(Solaris)(Windows)MassLoadCustomizer.properties is located in the massload.zip archive. Extract this file, rename it but keep the .properties extension, and place it in a directory that is in the classpath.
Do not remove or modify the existing MassLoadCustomizer.properties file.
Copy the ISeries_LODWCSDTA_Customizer.properties file from the following directory:
/QIBM/ProdData/Commerce56/properties
to a directory that is in the classpath , rename the new file but keep the
- .properties extension. Make the necessary changes to this new file.
Do not remove or modify the original ISeries_LODWCSDTA_Customizer.properties file.
- In the new massload utility customizer property file, specify the XML configuration-information file. For example:
PASyncDocumentURL = PASyncInfo.xml- In the new massload utility customizer property file, enable synchronization. For example:
PASyncEnabled = true- Specify the new massload utility customizer property file name as the value of the customizer parameter of the Load command.
- Use either the SQL import or the delete method with the Load command. Here is an example of appropriate XML input to the massload utility:
<store-asset> <catentry CATENTRY_ID="10351" MEMBER_ID="-2000" PARTNUMBER="000051" CATENTTYPE_ID="ProductBean" MFPARTNUMBER="m000051" MARKFORDELETE="0" BUYABLE="1" /> <catentry CATENTRY_ID="10352" MEMBER_ID="-2000" PARTNUMBER="000052" CATENTTYPE_ID="ProductBean" MFPARTNUMBER="m000052" MARKFORDELETE="0" BUYABLE="1" /> <catentry CATENTRY_ID="10353" MEMBER_ID="-2000" PARTNUMBER="000053" CATENTTYPE_ID="ProductBean" MFPARTNUMBER="m000053" MARKFORDELETE="0" BUYABLE="1" /> <catentry CATENTRY_ID="10358" MEMBER_ID="-2000" PARTNUMBER="000058" CATENTTYPE_ID="ProductBean" MFPARTNUMBER="m000058" MARKFORDELETE="0" BUYABLE="1" /> <catentry CATENTRY_ID="10365" MEMBER_ID="-2000" PARTNUMBER="000065" CATENTTYPE_ID="ProductBean" MFPARTNUMBER="m000065" MARKFORDELETE="0" BUYABLE="1" /> <catentry CATENTRY_ID="10372" MEMBER_ID="-2000" PARTNUMBER="000072" CATENTTYPE_ID="ProductBean" MFPARTNUMBER="m000072" MARKFORDELETE="0" BUYABLE="1" /> <catgpenrel CATGROUP_ID="10354" CATENTRY_ID="10372" CATALOG_ID="10351" SEQUENCE="3" /> <catgpenrel CATGROUP_ID="10354" CATENTRY_ID="10365" CATALOG_ID="10351" SEQUENCE="4" /> <catgpenrel CATGROUP_ID="10354" CATENTRY_ID="10358" CATALOG_ID="10351" SEQUENCE="5" /> <catgpenrel CATGROUP_ID="10355" CATENTRY_ID="10372" CATALOG_ID="10351" SEQUENCE="3" /> </store-asset>Disabling Product Advisor search-space synchronization provides better massload utility performance; therefore, use this feature only when it is needed.
Related concepts
Related tasks