7

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 YourController(IStorefrontContext storefrontContext, ISearchManager searchManager) { this.StorefrontContext = storefrontContext; this.SearchManager =...


3

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 : Implement the custom search function. Add this to your IGenerateScribanContextProcessor. private delegate IEnumerable<Item> SearchItemsDelegate(Item item, ...


3

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 variants will show the title of the page (or the display name). If you want to show extra fields, you should create your own variant that displays this data. Note ...


2

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 use a link type field in the facets. Add a computed field and use that fieldname in the facet: Add the following definition to your search configuration file: ...


2

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 solved a similar issue with a computed field. I added a computed field into my (sxa) index that contains the text you want as facet based upon the logic you ...


1

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 line in component-search-query.js (/sitecore/media library/Base Themes/SearchTheme/Scripts/component-search-query) hashStr += key + "=" + ...


1

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 field, section, Scriban etc. under the Variant Definition item has that field and can be utilized to make sure that does/doesn't render out depending on whether the ...


1

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 Assemble Name is correct. It has to have next format: {ClassNamespace}.{ClassName}, {AssembleName}


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). What you need to do is to implement that method (as it comes from your interface) rather than override. The same with FillBaseProperties() method. That is a ...


1

Yes, SXA will replace all special characters with space. Those characters are: -, +, &, |, !, {, }, [, ], ^, (, ), ~, :, ;, /, \, ?, "". It is done in RemoveSpecialSearchCharactersProcessor processor from normalizeSearchPhrase pipeline. In terms of searching for word1 word2 you're also right, we will split the search phrase by space and add it ...


1

You will have to modify component-search-results-filter.js file. There is if (properties.multi) inside updateFacet function. If you will look inside there is another if if (currentFacet[0].type == "button") { for (i = 0; i < sig.length; i++) { // updating hash here } queryModel.updateHash(hash); // this is what should be ...


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