SXA search - Accordion Items are not indexing sitecore search or solr dashboard, even in scope query builder search, items not appearing.

Prem Murmu on 1/5/2023 3:07:00 PM

I am working on SXA search in Sitecore i found something strange, content or data in accordion item type templates are not indexing.

I added _searchable template inheritance to all base templates of accordion templates (Accordion, Accordion Item, Accordion folder) It also didn't work.

I tried to query the template and accordion item in Solr dashboard and also tried to search accordion item template type item in Sitecore search box, items are not showing there.

Solution:

Later I know composite rendering child items( of types Accordion Item, Carousel Slide, Flipside templates etc..), templates, placeholder keys are excluded by default, so this is reason these items types are not indexing in Sitecore Search or Scope query, Solr search, I don't know why they are excluded by default.

I checked the showconfig. aspx({SitecoreUrl}/Sitecore/admin/showconfig.aspx) and search the accordion item and found the config name " Sitecore.XA.Feature.Composites.config " is the config which excluding the accordion items, templates and placeholder keys.

Path of the config: {SitecoreUrl}/App_Config/Moddules/SXA/Feature

I commented the few line, where accordion related templates, items and placeholder key were excluded., 

I only commented the accordion related element because i have to indexed accordion items, if you want to index other composite item type like Carousel Slide, Flip side, Tab Item you can comment them as per your requirement.

Best practice make separate patch if possible, but just comment few lines for checking.

Commenting ExcludedPlaceholderKeys below:

You can copy the config:

    <excludedPlaceholdersKeys>
    <!-- <placeholder name="accordioncontent">accordioncontent</placeholder>
                <placeholder name="accordionheading">accordionheading</placeholder>  -->
                <placeholder name="mvcslider">mvcslider</placeholder>
                <placeholder name="tabheading">tabheading</placeholder>
                <placeholder name="tabcontent">tabcontent</placeholder>
         </excludedPlaceholdersKeys>


Next Commenting AddExcludedTemplate below:



You can copy the config:

     <exclude hint="list:AddExcludedTemplate">

     <!--  <AccordionItem>{A6DDAC75-7D24-4BDB-B3F6-5F47FBB21379}</AccordionItem>-->

           <CarouselSlide>{142E5FC1-EC62-4540-BAD9-CD88F337CD2E}</CarouselSlide>

           <Flipside>{36F45117-539A-4A13-ABF8-F1F74CB4B249}</Flipside>

           <TabItem>{B27059E6-1190-4273-92A0-D22AF3C440B4}</TabItem>

        </exclude>



Restart Solr engine ==> IISRESET In CMD(Admin Mode) ==> Rebuild Indexes(related index)


This is way you can index composite rendering items content in Sitecore SXA.


Then it started indexing accordion items and also started appearing in full text search.


I tried the below references. didn't work for me. but got idea.

Ref:

1.  SXA search - Accordion Items are not shown up after indexing even in scope query when we provide template name

2.  How can I modify SXA search component to search also in the Accordions content?

3. Accordion item type template items not indexing in sitecore search as well as solr search

0 Comments on this post

Comments(0)||Login to Comments


InterServer Web Hosting and VPS
  • see more..