I'm using SXA 1.7 and Sitecore 9.0.1.

I have created a folder under the Site node and when my search should check the field values under the folder. For this I have created a search scope. I'm confused what needs to be added under Scope query and Boosting rule.

Under boosting rule I have specified some conditions but nothing is working. Can anyone please explain clearly what needs to be added in scope query and Boosting rule. enter image description here

Step 1: Created a Search component and SearchResult component using SXA and specified the search scope name.
Step 2: created a template called Book template where it has 3 fields after that created a folder under site named as "searchdata" and added values to the template created . Step 3: When I click on search its not giving any results from the folder which is created under site but I can retrieve other data which is from the pages created under the Home item. In the search scope query I have added the location for the folder but still it's not working.

enter image description here

enter image description here

  • The query should have the folder (as I assume you have in the screenshot) and you don't need rules for your requirement. If this is not working, we will need some more information about what you have done and what is not working.
    – Gatogordo
    Feb 3 at 14:06
  • I have created the search component and specified the search scope for it. In CMS Under site i have created one folder under that i have added some data and under scope query what needs to be sent as query@Gatogordo
    – Vinaya
    Feb 3 at 14:43
  • Try to add more information to the question (edit it).. Show us all the steps you did, and the results and how they are not what you expect.
    – Gatogordo
    Feb 3 at 15:51
  • @Vinaya Just can you try removing the rule and then try retrieving the results? Also make sure the items you are trying to retrieve is available in sxa_master_index and sxa_web_index respectively. Feb 3 at 16:53
  • @Gatogordo edited the steps
    – Vinaya
    Feb 3 at 17:20

Step 1: include the needed base template

To include items created using a custom template into search results, you have to inherit the _Searchable base template (/sitecore/Templates/Foundation/Experience Accelerator/Search/Computed Fields/_Searchable).

Step 2: your data is not in the "site"

As your data is not an actual page in the site, that might cause issues. I haven't tried this myself, but Peter describes a solution to handle those items in his blogpost: https://tothecore.sk/2020/02/20/how-to-crawl-items-in-non-sxa-locations/

Unfortunately the best solution is new in 9.3 (use _SearchableWithoutRelatedItems as base template). But according to the blog there is way around: expand the SXA indexes (master and web) with one more crawler (default Sitecore crawler) and aim it to the necessary location.

Note also that as the items are not in your site node, you won't be able to create a link to them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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