Solr Search Implementation in Sitecore JSS Project with Code (First Blog)
Hello Friends,
I will be covering Solr Search Implementation in Sitecore JSS project from Architecture to Code.
Lets Say we need to search a text in questions of FAQ section based on question template and return all items that contains that text.
Basic Overview as follows :
we will be giving one API to the frontend for Solr search and they will be appending the API with query string parameters.
ex. https://example.com/api/sitecore/<controllerName>/<actionMethod>
and they will append it with query string parameter and this will give call to our controller.
ex. https://example.com/api/sitecore/<controllerName>/<actionMethod>?q=ProgrammingGuide
this request will hit our controller with "ProgrammingGuide" as parameter.
Controller -----> this will accept the first request and give call to Repo
Repo -----> this will contain method based on search result model and will give call to the Search Result Service.
SearchResultService -------> this will contain actual method to get document from solr and also method to build queries.
ex.
Controller ---> Repo ----> SearchResultService.
And In controller we serialize data using NewtonSoft and sent it to frontend.
Link for Second part : Solr Blog Second Part
Link for Third part : Solr Blog Third Part
Comments
Post a Comment