Skip to Content

facetSearchConfig is not getting prepopulated

Hi,

In order to resolve the browser crash issue on keyword redirects tab I have used hMC shorctut. Please refer to https://wiki.hybris.com/display/release5/Browser+Crash+on+Many+Entries+with+a+ReferenceCollectionEditor#BrowserCrashonManyEntrieswithaReferenceCollectionEditor-Solution

It solves the browser crashing but now there is another issue. We do not have an option to create a new keyword. Only way to create a new keyword is to clone an existing one. When we are cloning, the "facetSearchConfig" field is not pre populated and it is non-editable. Due to this it is not possible to create a new keyword. Please refer the attached screenshot.alt text

Please let me know if there is a way to solve this issue.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2017 at 02:36 AM

    Hello

    Well looks like facetSearchConfig is read-only in hmc.xml [solrfacetsearchhmc]

     <attribute name="facetSearchConfig" editable="false"/>
    
    

    What you can do is -
    Either make it editable (but check why it's read-only in the first place)
    OR
    Add a 'Create Keyword Redirect' shortcut beside your existing shortcut in the same section under SolrFacetSearchConfig type where you can pre-populate the facetSearchConfig attribute -

     <shortcut name="CreateKeywordRedirect" type="SolrFacetSearchKeywordRedirect" usage="creator">
         <preset targetattribute="facetSearchConfig"/>
     </shortcut>
    
    

    Cheers

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 26, 2017 at 11:55 PM

    ImpEx for SOLR Configuration

    Macros / Replacement Parameter definitions

    $facetSearchConfigName=mySiteIndex $contentCatalog=mySiteContentCatalog $contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged] $productCatalog=mySiteProductCatalog $productCatalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:Staged] $lang=fr

    Example 1 - URI Redirects

    Once created the Solr URI's Redirects, we can create the Keywords redirect

    $site-cart=mySite-cart $site-basket=mySite-basket $site-accelerator=mySite-accelerator $site-hymacc=mySite-hymacc

    Redirect page URL

    PDATE SolrURIRedirect;url[unique=true];&redirectRefID ;"/cart";$site-cart ;"/cart";$site-basket ;"http://www.hybris.com/multichannel-accelerator";$site-accelerator ;"http://www.hybris.com/multichannel-accelerator";$site-hymacc

    Keyword Redirects

    NSERT_UPDATE SolrFacetSearchKeywordRedirect;facetSearchConfig(name)[unique=true,default=$facetSearchConfigName];language(isocode)[unique=true,default=$lang];keyword[unique=true];matchType(code)[unique=true];redirect(&redirectRefID);ignoreCase[default=true] ;;;"cart";EXACT;$site-cart; ;;;"basket";EXACT;$site-basket; ;;;"accelerator";EXACT;$site-accelerator; ;;;"hymacc";EXACT;$site-hymacc;

    Example 2 - Page Redirects

    Once created the Solr Page Redirects, we can create the Keywords redirect

    $site-help=mySite-help $site-shipping=mySite-shipping

    Redirect page

    PDATE SolrPageRedirect;redirectItem(uid,$contentCV)[unique=true];&redirectRefID ;faq;$site-help ;faq;$site-shipping

    Keyword Redirects

    NSERT_UPDATE SolrFacetSearchKeywordRedirect;facetSearchConfig(name)[unique=true,default=$facetSearchConfigName];language(isocode)[unique=true,default=$lang];keyword[unique=true];matchType(code)[unique=true];redirect(&redirectRefID);ignoreCase[default=true] ;;;"help";EXACT;$site-help; ;;;"shipping";STARTS_WITH;$site-shipping;

    Example 3 - Product Redirects

    Once created the Solr Product Redirects, we can create the Keywords redirect

    $site-1382080=mySite-1382080 $site-2053266=mySite-2053266 $site-1352537=mySite-1352537

    Category Redirect

    NSERT_UPDATE SolrProductRedirect;redirectItem(code,$productCatalogVersion)[unique=true];&redirectRefID ;1008408;$site-1008408 ;1109451;$site-1109451 ;1352537;$site-1352537

    Keyword Redirects

    NSERT_UPDATE SolrFacetSearchKeywordRedirect;facetSearchConfig(name)[unique=true,default=$facetSearchConfigName];language(isocode)[unique=true,default=$lang];keyword[unique=true];matchType(code)[unique=true];redirect(&redirectRefID);ignoreCase[default=true] ;;;"M403";CONTAINS;$site-1008408; ;;;"M340";CONTAINS;$site-1109451; ;;;"S73";CONTAINS;$site-1352537;

    Example 4 - Category Redirects

    Once created the Solr Category Redirects, we can create the Keywords redirect

    $site-sony=mySite-1028 $site-canon=mySite-1060 $site-memory=mySite-17033

    Category Redirect

    NSERT_UPDATE SolrCategoryRedirect;redirectItem(code,$productCatalogVersion)[unique=true];&redirectRefID ;1028;$site-sony ;1060;$site-canon

    Keyword Redirects

    NSERT_UPDATE SolrFacetSearchKeywordRedirect;facetSearchConfig(name)[unique=true,default=$facetSearchConfigName];language(isocode)[unique=true,default=$lang];keyword[unique=true];matchType(code)[unique=true];redirect(&redirectRefID);ignoreCase[default=true] ;;;"M8";STARTS_WITH;$site-sony; ;;;"M17";STARTS_WITH;$site-canon;

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.