Search code examples
javadatabase-designe-commercewcs

Deleting and renaming attributes in Attribute Dictionary in Websphere Commerce


I have two attributes in my attribute dictionary. One is SAMPLE_ATTRIBUTE and the other one is MODEL_ATTRIBUTE. If I delete SAMPLE_ATTRIBUTE, and want to rename MODEL_ATTRIBUTE to SAMPLE_ATTRIBUTE, can I do it? Will the change reflect right away? Or is there anything that need to be “run” to purge that reference before I can rename another attribute with the same name?


Solution

    • you can delete the dictionary attribute as long as it is not referenced by other products, if it is referenced (assigned to other products), you can not delete manually from CMC before you go and delete the attribute from referencing product.

    • you can rename dictionary attribute to another one as long as the identifier is unique, and it will save your changes instantly yo database

    • if you use this dictionary as facetable attribute, what I encountered in previous project that deleting the dictionary attribute will leave the record in SRCHATTR table, so I have to delete the record manually using SQL before i can mark it facetable again.

    • front-end store (Aurora) is using Apache solr for product browsing, product detail & search, deleting or changing in facetable dictionary attribute will trigger Full Solr indexing to your products, you need to make sure that you have the schedule job "UpdateSearchIndex" scheduled at site level , otherwise solr indexing will not occur and hence you will not see your changes reflected.

    • in FEP7+, triggering UpdateSearchIndex" job will also invalidate dynacache records for that product . not sure about FEP6 but this feature is not there before FEP6 , so if you have Caching enabled, you need to figure out way to invalidate those product caches (normally by writing sql triggers)

    hope that answers your question and give you what you need.

    Thanks Abed