1

I am trying to make my accordion items (data source is in Data node) searchable. I tried adding _searchable to the accordion-item, but I guess it is not getting indexed.

As I try to add it using template name: accordion item in search scope it is not showing up the results related to accordion items.

4
  • Can you share a bit more what you did and what your expected result is?
    – Gatogordo
    May 13, 2020 at 18:34
  • @Gatogordo I am trying to make accordion items to searchable and see the results. But it is not showing in search scope , i even made accordion items searchable and made its properties available in search
    – Manik
    May 15, 2020 at 2:47
  • What is your scope? Where and how are you searching? What is the result and the expected result?
    – Gatogordo
    May 15, 2020 at 6:06
  • My scope is just template name as "Accordion item". I am trying to search with the content in accordion item which are used as data source. I want that page to be available in search results when i search with accordion content.
    – Manik
    May 16, 2020 at 8:08

2 Answers 2

0

If I understand correctly you have set your scope to only datasource items. But you expect the get the items where those datasource items are shown. That won't work...

You need to set the scope to the pages (items) where the accordion (datasource) is shown as that is what you want as a result. The results of the search component needs to be a page (with a url), datasource items would not make sense there as you cannot link to those.

So in short: set the scope to the pages and not the datasources.

2
  • Thanks for your reply. Kindly let me know whether there was a difference in the steps i have been trying following this link - sitecore.stackexchange.com/questions/11758/…
    – Manik
    May 18, 2020 at 2:32
  • No idea what the context of that Q/A was, but as datasource items should not be linked to (as they don't have a layout) it does not make sense to have those in public search results. Those should only include pages (that might include accordions)
    – Gatogordo
    May 18, 2020 at 7:57
-1

To configure search on sxa need to follow these steps

  1. Create search scope in sxa enter image description here

in scope you need to define location and template 2. Out of box sxa search resultpage, need to add on page item and update search criteria for scope enter image description here

if you have set location in scope query please make sure news item should be under this location (root).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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