Skip to main content

Posts

Sitecore Solr Auto Suggester on Multiple Field

Sitecore Solr Auto Suggester on Multiple Field  In the last blog , we have created Solr auto suggester functionality on a single field. Now in this blog, we are going to discuss how we can display results in suggest component on basis of multiple fields value, suppose you have one field Title and another is a Tag and now when user search any word it will search result on both Title and Tag fields. To do this, add multiple dictionaries like below for contentSuggester and tagSuggester field. <searchComponent name="suggest" class="solr.SuggestComponent"> <lst name="suggester"> <str name="name">contentSuggester</str> <str name="lookupImpl">AnalyzingInfixLookupFactory</str> <str name="dictionaryImpl">DocumentDictionaryFactory</str> <str name="field">title_t</str> <str name="contextField">_template</str> ...

Solr Auto Suggester With Sitecore

Solr Auto Suggester With Sitecore What is a Solr Suggester? The Solr suggester component provides automatic suggestions to users, just like Google provides suggestions. Solr has a suggester component which is called SuggestComponent. More detail is available here Configuration the SuggesterComponent Navigate to this location “SolrFolder\server\solr\configsets\INDEXNAME \conf” and open “solrconfig.xml”. Search below comment in “solrconfig.xml” file. <!-- SearchHandler http://wiki.apache.org/solr/SearchHandler For processing Search Queries, the primary Request Handler provided with Solr is "SearchHandler" It delegates to a sequent of SearchComponents (see below) and supports distributed queries across multiple shards --> and paste the below code: <searchComponent name="suggest" class="solr.SuggestComponent"> <lst name="suggester"> <str name="name">contentSu...

Setup Sitecore JSS application

Setup Sitecore JSS application Before starting to create JSS application, we need to understand what is a Sitecore JSS. What is a JSS Sitecore JavaScript Services (JSS) is a complete SDK for JavaScript developers that enables you to build full-fledged solutions using Sitecore and modern JavaScript UI libraries and frameworks. Sitecore JSS support Angular, React and Vue JavaScript framework. How to create a JSS application? Firstly, to develop a JSS application, Node needs to be installed into your system. Install the JSS Command Line Application CLI makes it easy to create a new project, scaffold components, deployment of your JSS application, etc. To installed CLI globally, run below command in the command prompt: npm install -g @sitecore-jss/sitecore-jss-cli Create a JSS application To create a JSS application, need to follow the below steps: Create a folder with any project name In project folder, run jss create <your-app-name...

Sitecore JSS create your first component

Sitecore JSS create your first component  In the previous blog , JSS setup has been done. Now it’s time to create your first component, apply the newly created component into a route and test it in disconnected mode. Scaffold the component To scaffold new component, JSS sample app providing a script which allows you to scaffold new component easily. This script is available in “/scripts/scaffold-component.js” you can customize it as per your requirement. Run below command to scaffold component, type jss scaffold and your component name like HeroBanner. This command will generate all files which are required. jss scaffold HeroBanner After the scaffold HeroBanner component you can see below files has been added into your JSS application: /sitecore/definitions/components/HeroBanner.sitecore.js /src/components/HeroBanner/index.js HeroBanner.sitecore.js will contain template name, icon, fields by default.  index.js will contain view of HeroB...

Sitecore Publishing Service with Sitecore 9.2

Sitecore Publishing Service with Sitecore 9.2 Sitecore publishing service (SPS) 1.1 has been launched with Sitecore 8.2, it is an optional replacement of existing Sitecore publishing. Sitecore publishing service module reduces the time spend on publishing large volumes of items also it improves the user experience. SPS runs outside from the Content Management worker process as it SPS runs separate service and move data from master to web database. When Content Editor does any changes, CM server sends a signal to SPS that what changes had been done, then SPS will calculate a manifest of what needs to be publish. After publishing, SPS will send the signal to CM servers that what has been written so that they can update search indexes and clear affected cache, etc. The module has 2 parts. Sitecore Publishing Service Module Package Publishing Host Service Prerequisite .Net Core Sitecore Publishing Service Package Sitecore Publishing Service Module Ins...

What is a Sitecore Horizon???

What is a Sitecore Horizon??? Recently Sitecore launched Horizon Editor with Sitecore Experience Platform 9.3. Horizon is the next generation experience for web content management.  Horizon is a combination of Content editor and Experience Editor. Horizon is providing many features, but my personal favorite feature is auto-saved because in experience editor, the content editor needs to click on save after applying any changes.  Horizon is much more clean, simple. Horizon is proving below functionality: Autosave Customize the view Undo/Redo Delete a page or folder Create a page Change display name Edit a page Publish page Add rendering Page Editor Preview a site in Simulator View page insights Autosave Horizon editor saves your changes in every 2 seconds when you will complete editing in field. Customize the view Horizon editor will provide you the facility to adjust the view in different devices like in Phone, Tablet, Desktop. ...

Sitecore 9 Forms: Robot detection

Sitecore 9 Forms: Robot detection As you know Sitecore 9 does not provide “Update Contact details” out of box but Sitecore is providing code for that which you can find from here In my current project, I am using Sitecore 9.0.2 and using the same code which Sitecore is providing for Update Contact. Recently I faced an issue where the form is getting spammed.  After some investigation, I found IsRobot function which is a helper method of Sitecore.Analytics.Pipelines.ClassificationStrategy.ContactClassification class.  This helper methods take the contact classification as a parameter and return a Boolean value which indicates whether the contact is a robot or not. public static bool IsRobot(int classification); Below is a code of UpdateContact: namespace Sitecore.ExperienceForms.Samples.SubmitActions { /// <summary> /// Submit action for updating <see cref="PersonalInformation"/> and <see cref="EmailAddressList"/...