6

Recently one schema field was changed from type Text to Number. After the change, components based on that schema were not being added to FH any more. The xmlloader.log shows the following:

WARN  [XML-Parser-Thread] AttributeDefinitionVerificator.java:187 10476 Cannot create attribute `metadata_tcm_34_1148_8_price' of basetype `float' for item `tcm_34-84058-16_tcm_34-25404-32', because this attribute already has a type `text'. || fredhopper@istuatcmsmtrg:fredhopper/data/installations/FAS tags/fas/fas-7.5.0.16/engine@107262
ERROR [XML-Parser-Thread] FredhopperHandler.java:354 10499 Rejecting faulty item `tcm_34-84058-16_tcm_34-25404-32'. || fredhopper@istuatcmsmtrg:fredhopper/data/installations/FAS tags/fas/fas-7.5.0.16/engine@107262

When viewing the Navigation index in FH Business Manager I can see that the Basetype is still text instead of float, see below.

enter image description here

I can't find where this value can be changed (if possible at all manually). Any ideas on where can this be changed, and also other things to look out for after schema field type changes?

Just a side-note, this value is not used in a trigger type, nor it is a live attribute. FH version is 107262 running on Linux, paired with Smarttarget 2014SP1.

Thanks.

4

That is unfortunately a known limitation in Fredhopper. You cannot change the type of an attribute after there are indexed items using it.

You will need to perform a reindex to solve it and make sure all of the Components use the new field type.

So first you need to find any items in Fredhopper that use the Schema. Search for any files with the schema ID in it, within Fredhopper\data\instances*instanceName*\data\xml\processed\batch. Then, you have two options:

  1. Do a reindex but exclude all of those files when you copy to the catalog in step 5 -- then publish the Components from SDL Web after the reindex is complete.
  2. Change the 'type' attribute in the XML files first and then do the reindex as documented.
2

I wanted to add another answer with something that SDL provided to us related to this issue that works:

Here are the steps required to proceed.

Steps:

1 Assuming the Deployment agent is running stop the INSTANCE (indexer)

e.g. C:\fredhopper>bin\instance INDEXER stop

2 Check to see if there is anything in C:\fredhopper\\data\fas-xml\catalog01

Backup and Remove any contents

3 Place metadata.xml file from the cd layout to the location C:\fredhopper\\data\fas-xml\catalog01

4 Perfrom REINDEX from a command line e.g. C:\fredhopper> bin\reindex

5 Republish the components

This will allow new structure of the schema to be accepted by Fredhopper

Also, additional step that we had to do was execute bin/fresh-index-to-live indexer to update query instances, because we observed that syncserver process was not working correctly.

We saw that this process clears all items in fredhopper and requires indexer and qservers to be offline.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.