Sunday, 19 June 2016

Multiple Crawler for Sitecore Context Search

 One fine day last Thursday.We found the in Production Solr is not able to Initiate the one of the core.

It was throwing the below error.



Caused by: java.lang.OutOfMemoryError: Java heap space


We have done basic troubleshooting increasing the Java Heap Memory. Increasing the Server memory but seems it was a bad day.


Image result for is you have an issue here is tissue



 In real life meme don't work.

We were constantly being chased by client as Solr being down was impecting multiple features on CM and CD Server. Thanks to god we had one backup solr Server which we have used as fallback.

So business Happy now ..

                                        https://media.riffsy.com/images/63bfb4e6c6767f8f32bf521650e6810a/raw?riffsid=lyxIPxh2sIMLsZi-JRgvLzB6p3u8wipHbtLVKxKeqZRLMyqs_59_Y6HSWTmtny6iccbOOYI879uZ

But we still need to find why solr core is not getting loaded. We delete all the index data but no luck.

Then I saw the T_log folder is having ample of files. I have deleted all of them voila it worked.



Still the problem is not solved if someone will rebuild the Sitecore_master_index the issue will appear again why because the whole content tree getting Indexed.

Question is how??

Answer is we have defined the Sitecore Root as Root in the Sitecore Master Index.


           <Root>/sitecore</Root>



So whenever we rebuild the Index its was time consuming and memory consuming operation

Image result for we did it meme
We have limited that by adding Multiple Crawler and defining the Root for all of them so Sitecore context search works absolutely fine.

      <locations hint="list:AddCrawler">
              <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
                              <Database>master</Database>
                <Root>/sitecore/content/Home/Products</Root>
              </crawler>
             
             
                <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
                              <Database>master</Database>
                <Root>/sitecore/content/Home/Artciles</Root>
              </crawler>



Now we have light weight Solr Index which are getting rebuilt very quick.

So when we need to add some items to be Indexed. We can add a new Crawler adding the specific root for the same.

Happy Indexing.








             

2 comments:

  1. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in SITECORE , kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on SITECORE. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Saurabh Srivastava
    MaxMunus
    E-mail: saurabh@maxmunus.com
    Skype id: saurabhmaxmunus
    Ph:+91 8553576305 / 080 - 41103383
    http://www.maxmunus.com/

    ReplyDelete

Featured post

Getting Started With SOLR

Getting Started with Solr ·           Features o    Hit highlighting o    Auto correction o    Faceted Search o    Multi lan...