7 votes
Accepted

How to get Storefrontcontext in XC 10.1

Solution 1 : You can create a constructor and then find it from there as follows - public IStorefrontContext StorefrontContext { get; set; } public ISearchManager SearchManager { get; set; } public ...
Gaurav Agarwal's user avatar
6 votes
Accepted

Solr Indexing issue in Sitecore 10.2

This issue may be coming because while you are doing indexing from the control panel, it is throwing some errors and because of the error it is not indexing all articles. I would suggest you check the ...
Swati Gupta's user avatar
  • 2,890
4 votes

SXA Search Result Sort Order

SXA provides 2 types of sort order OOTB - Sort by Names Sort by Count But to achieve sort order as per your requirement, you need to create a custom sort order for that. First, need to add ...
Gaurav Agarwal's user avatar
3 votes

Search results components

Yes. All you have to do is to put two Search Results renderings on each tab and configure search scope. Use search scope to define which templates should appear on the particular tab. Search scope – ...
Alan Płócieniak's user avatar
3 votes
Accepted

How do you create a scriban function which implements the Content Search API?

I was able to accomplish this in a few steps in SXA 9.3. This approach implements the ISearchService included with SXA. We're basically extracting code that is used by the SearchController. Step 1 : ...
Michael West's user avatar
  • 18.1k
3 votes

Rich Text content not showing in OOTB search results in SXA

I am assuming you are using the standard (ootb) search results component. That component is using rendering variants: $site/Presentation/Rendering Variants/Search Results The default rendering ...
Gatogordo's user avatar
  • 20k
3 votes
Accepted

Could not find the computed index field type: BXA.XA.Foundation.Custom.Search.AggregatedContent, BXA.XA.Foundation.Custom.Search

I can assume that the Assemble Name part in "BXS.XA.Foundation.Custom.Search.AggregatedContent, BXS.XA.Foundation.Custom.Search" does not exist in your solution. Please, check that your ...
Vadim Birkos's user avatar
3 votes
Accepted

Is this possible to restrict the SXA search box to search only through a particular field?

This can be achieved by overwriting the sxacontent field in Solr document. Create a class by inheriting AggregatedContent class and overriding ComputedFieldValue Inside override method, access ...
Anjali Prathipati's user avatar
2 votes

Droplist field type and Drop link field both are showing Item ID in sitecore 9.0.1

You need to check this part of the documentation: https://doc.sitecore.net/sitecore_experience_accelerator/setting_up_and_configuring/configuring/extend_search#_Extend_search_to_3 This explains how to ...
Gatogordo's user avatar
  • 20k
2 votes

Sitecore sxa custom filter based on content tree multiple node selection as datasource

Facets work on fields. So you should have a field in your items that determines if the item is a product or an article (or ...). This could be the template, but that is rarely named as you want it. I ...
Gatogordo's user avatar
  • 20k
2 votes
Accepted

How to get the first "N" items while using Query Builder?

The Query Builder field does not support specifying a page size or offset. You can write your own code with the Content Search API where you first parse the Query Builder text and then add on the ...
Michael West's user avatar
  • 18.1k
2 votes
Accepted

SXA Pagelist vs SearchResults component

It seems that PageList in this SXA version isn't using solr queries like search results component, if you take a look in Sitecore.XA.Feature.PageContent.Repositories.PageListRepository it makes a call ...
Cristi Vulturar's user avatar
2 votes

SXA Pagelist vs SearchResults component

Pagelist and SearchResult might be used to show the same results (both coming from the index) but actually they work quite different. First difference is the way they work together with other ...
Gatogordo's user avatar
  • 20k
2 votes

SXA Facet filter dropdown with special character value not working properly and value double encoded

Did you use any custom SXA theme to achieve your search result? If yes then you need to try using the OOTB theme and check if the issue is still there. Or to resolve this issue you can update below ...
Gaurav Agarwal's user avatar
2 votes

Load Site based item only in 'Multilist With Search'

I don't think SXA provides this OOTB, we need to create QueryToken for Multlist With Search. The Multilist with Search field uses a SourceFilterBuilder class to parse its field source. Sitecore uses ...
Gaurav Agarwal's user avatar
2 votes

What is PageOrMediaPredicate and other Predicate in Sitecore SXA search library

PageOrMediaPredicate If you check Settings item under your SXA site root, you will find 2 fields there: Associated Media and Associated Content. If PageOrMediaPredicate is used on your site, only ...
Marek Musielak's user avatar
  • 23.6k
2 votes
Accepted

Search Result Listing Get index of an item using Scriban

I am afraid there is no way to do it because variant is used to generate each result separately not the whole list. This is a place where items from index are prepared Sitecore.XA.Feature.Search....
Alan Płócieniak's user avatar
1 vote

How can you combine search filters to show items that match either one criteria OR another, rather than items that must match all criteria?

The syntax of the Scope Query and Item Query are going to severely limit AND/OR logic typically expected in search results. Think of those as filters to reduce results by location (path in the tree), ...
Michael West's user avatar
  • 18.1k
1 vote

$name is getting indexed

$name is just a token which will be replaced by item name, if you will create item first and then add $name in standard value later then in $name will be reflect into your item because of standard ...
Swati Gupta's user avatar
  • 2,890
1 vote

$name is getting indexed

$name is a token that replaces by item name when we create item in the content tree. But sometimes accidentally or because of some issue during item creation,it doesn't change to the item name and ...
Mahendra Shekhawat's user avatar
1 vote

SXA seach Scope is not returning result in Search result component

Arul, The field name will be Event_end_date or one you have given in your computed index. Don't take the name from Solr. As Solr indexes are adding _* after the field name depending on the field type. ...
Maulik Darji's user avatar
1 vote

How to make SXA search on Data folder

Finally, I resolved the above issue. I have followed two steps Step 1: Inherit searchable with your template Step 2: Add Search scope with your data source location with +sign Step 3: Go to Settings,...
arul pushpam's user avatar
1 vote

Sort by children of page in content tree order

You need to use the __Sortorder field to sort on. That is y default not in your index though so you need to add that as well. The explanation can be found in detail on this blog: https://www....
Gatogordo's user avatar
  • 20k
1 vote

Not navigating to configured search result page

Add the Search Box rendering: To change the Search Box rendering properties, in the Search Box toolbar, click More, and click Edit component properties. In the Control Properties dialog box, select ...
Raman Gupta's user avatar
  • 2,444
1 vote

sxa custom boosting condition for dynamic value from cookie

This is achieved by imitating existing rules. Works as expected. string storeVisited = CookieHelper.GetCookie("VisitedStore"); WhenFieldAndQueryStringMatches<...
Christopher Raja's user avatar
1 vote

How To Create Custom Hierarchical Tree Search Filter

You can use Content Search API and apply FacetOn() method on IQueryable like this: context.GetQueryable<SearchResultItem>().Where(predicate).FacetOn(x => x[“Propery1Name”], 1).FacetOn(x => ...
QuachNguyen's user avatar
1 vote
Accepted

SXA Search is unable to return result with '-' or some special characters in Search results

SXA has a custom pipeline called normalizeSearchPhrase which is removing all special characters from the search phrase. All the characters from this HashSet are removed: new HashSet<string> { &...
Dawid Rutkowski's user avatar
1 vote

How to make Search box Suggestions to suggest on Specific field in Sitecore 9.0.1

I am using Solr 8.4 with Sitecore 10.1 I have used the following configuration and it works fine. The trick is to define the Field you want to see in the payloadField parameter Here's my suggester ...
Nidhi Sinha's user avatar
1 vote
Accepted

How you render Page List data with multiple rendering variants?

If it's purely presentational Dawid's answer in your link works perfect. However, if you want to display other fields for example you might be able to work with the Rules engine: Each individual ...
Trayek's user avatar
  • 1,207
1 vote

How to write a custom controller for sitecore SXA search result in sitecore 9.0.1?

The GetModel() method is a virtual method of SXA AbstractRepository. Most of SXA repositories inherits from it, that is why we are overriding that method in a lot of places (as you probably noticed). ...
Dawid Rutkowski's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible