5

I am using SXA in Sitecore 9, I have created simple search scope with below query:

template:{cbb0f1aa-1a19-4c0a-a897-49af144cb801};+location:{3F38A230-25BB-4DBA-B9D3-2CE94F842072}

From UI there are search result returned, however when I add Search result rendering in a page and use the search scope above, no results return in the page. I checked Search log and I found the query issued from UI is:

12548 12:41:09 INFO  Solr Query - ?q=(((_path:(3f38a23025bb4dbab9d32ce94f842072) AND _template:(cbb0f1aa1a194c0aa89749af144cb801)) AND _latestversion:(1)) AND _datasource:(sitecore))&start=0&rows=20&fl=*,score&fq=_indexname:(sitecore_master_index)&wt=xml

From Search Result Rendering:

26128 12:29:08 INFO  Solr Query - ?q=(((_path:(3f38a23025bb4dbab9d32ce94f842072) AND _template:(cbb0f1aa1a194c0aa89749af144cb801)) AND (_path:(3f38a23025bb4dbab9d32ce94f842072) AND searchable_b:(True))) AND _latestversion:(True))&rows=0&fq=_indexname:(sitecore_master_index)&wt=xml

the difference is searchable_b:(True), how we can set this field and what does it mean?

7
  • I assume you have a checkbox field named 'searchable '. You need to check this for the items you want to show in your results, and then publish
    – TamerM
    Commented Jan 3, 2018 at 10:52
  • i am using the OOB Page template provided by SXA, that found under /sitecore/templates/Project/[Talent Name]/Page Commented Jan 3, 2018 at 11:11
  • I'm not sure about the template you're referring to, but it (or templates it inherits) should have a field named 'Searchable', do you see it in the template's standard value or not?
    – TamerM
    Commented Jan 3, 2018 at 13:42
  • Yes , its inherit from : (1) Page - /sitecore/Templates/Foundation/Experience Accelerator/Multisite/Content/Page (2) Standard template - /sitecore/Templates/System/Templates/Standard template Commented Jan 3, 2018 at 14:04
  • Does the Content/Page template contain a 'Searchable' field?
    – TamerM
    Commented Jan 3, 2018 at 14:28

3 Answers 3

2

'searchable_b:(True)' is a computed field (part of SXA) that returns true if the item inherits 'Searchable' template. So if your page templates inherit 'Searchable' (directly or indirectly) you should be good, but make sure to publish.

Your main problem seems that the query is requesting 0 rows. Maybe the 'Page Size' in your search component has been set to 0 by mistake. enter image description here

2

The field "searchable_b":true

you need to include the base template and a few more settings, As mentioned below.

enter image description here

By default all pages under home is "searchable_b":true but for all data items, you need to add configure a few more settings -

Go to settings --> Associated Content and select those data

After that perform the reindex, this will update the index to "searchable_b":true

Example below -

  1. Data items with _Searchable temmplate but without setting configuration

enter image description here

  1. Data items with _Searchable template and with setting configuration

enter image description here

For more troubleshooint steps, you can check here - http://jitendrasoni.blogspot.com/2020/04/sxa-search-result-tips-for.html

0

I was also facing issue due to searchable_b field. When I was trying to query in solr dashboard UI and querying with searchable_b field, I was not able to get results. Actually the reason was searchable_b field not getting indexed. So I added this field under node in solr config and rebuilded index again. It worked for me.

<field fieldName="searchable">Sitecore.XA.Foundation.Search.ComputedFields.Searchable, Sitecore.XA.Foundation.Search</field>

Your Answer

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

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