Wednesday, February 6, 2013

Making An Attribute As NonFacetable in WCS

In Pr-Feature pack 5 of V7 to making an attribute as non facetable you need to do the following steps.
  • UPDATE ATTR SET searchable=0 WHERE attr_id =?(ideally this is the only step the business user makes via management center. But this change will not make the attribute as non facetable)
  • DELETE FROM ATTRDICTSRCHCONF WHERE ATTR_ID = ?(The mapping between attribute and search schema)
  •  DELETE FROM SRCHATTRPROP WHERE SRCHATTR_ID in (SELECT  SRCHATTR_ID FROM SRCHATTR WHERE IDENTIFIER LIKE ?(Table defining the search index attribute like facet, rank, sort etc..)
  •  DELETE FROM SRCHATTR WHERE IDENTIFIER = ? 
If you are using Feature pack 5 of V7 along with the above you need to do the following steps as well
  • UPDATE ATTR SET facetable=0 WHERE attr_id=?
  • DELETE FROM SRCHATTR WHERE SRCHATTR_ID IN (SELECT SRCHATTR_ID FROM FACET WHERE ATTR_ID =? )
  • DELETE FROM FACET WHERE ATTR_ID = ?