8

I have custom search Index(SOLR) which has two root locations defined, one points to /home node and another points to repository(videos), we also have indexing strategy(onPublishEndAsync) in place.

<locations hint="list:AddCrawler">
 <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
    <Database>web</Database>
    <Root>path to home node</Root>
 </crawler>
 <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
    <Database>web</Database>
    <Root>path to repository items</Root>
 </crawler>
</locations>

Problem which i am observing is- item from the second root location is not getting indexed(in this case repository items), if i move this to first, it index the repository items and not items under home node.

However, if i rebuild the index manually from indexing manager, everything works as expected.

Anyone have thoughts here? what is missing here to make sure indexing strategy works with multiple roots as well.

I am using Sitecore 8.1 (rev. 160302)

7

We had the exact same issue as well with Lucene indexes. Sitecore was able to provide a patch for the SitecoreItemCrawler class. It doesn't appear to be on their Github so I can't link it but ask for support DLL 108165.

The issue is fixed in Sitecore 8.2 Update 1

  • To add some more clarity to this, the issue was that SitecoreItemCrawler was adding the item to the "list of already indexed items" before checking whether the item was relevant to the current crawler. When the second crawler got the item, it was already in the processed list so it was skipped. We worked around it by creating our own patch, but it did the same as the official patch do it's not worth posting. – Richard Szalay Jun 4 '17 at 22:06
2

I've encountered the same problem a few weeks ago for Sitecore 8.1 (public repo link) and Lucene configuration.

Starting from the update 160302 different behaviour for multiple index crawlers can be observed.

For Sitecore 8.1 rev. 151207 everything worked fine, right now, if you have multiple crawlers defined, only first is fired.

I've decompiled sources and observed that there are some changes that can cause such a behaviour.

Workaround

We've solved the issue by creating separate indexes for each database (one for master and one for web).

If this is something you can do I highly recommend that (none of default Sitecore configs has multiple crawlers defined so it is probably safer to go this way)

  • Hi @AlanPłócieniak, Thanks for the information, i have two crawlers on the same database, pointing to different items. Rather than creating two indexes, i can directly use the default web index, but i am not wishing to use web index, as it contains everything. So this will be the last option. – Gopikrishna Gujjula Dec 20 '16 at 12:06
  • I would recommend you to create a Sitecore support ticket for that if you can. You will probably get an answer faster there as this is a platform issue. – Alan Płócieniak Dec 20 '16 at 18:20
  • Thank you, i will raise a support ticket. Already @LyleJordan, answered saying they got patch for it. So this would be the ideal option. – Gopikrishna Gujjula Dec 21 '16 at 4:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.