2

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?

  • 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 Jan 3 '18 at 10:52
  • i am using the OOB Page template provided by SXA, that found under /sitecore/templates/Project/[Talent Name]/Page – user1534066 Jan 3 '18 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 Jan 3 '18 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 – user1534066 Jan 3 '18 at 14:04
  • Does the Content/Page template contain a 'Searchable' field? – TamerM Jan 3 '18 at 14:28
1

'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

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.