Sitecore deleting Solr documents

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Sitecore deleting Solr documents

Joshua Campbell
Hi All,
I'm having an odd issue with Solr, and am looking for some help or suggestions.

We're using Solr (on a Sitecore website) for search and some search-driven pages. CM is pointing to a sitecore_master_index in Solr, while CD is pointing to a sitecore_web_index. We're using the OnPublishEndAsync strategy. Something really odd is happening.

When we publish content, it shows up on CD (and the correct Solr index), then, about 90 seconds later, it's gone.

If anybody has any insight into why this might happen, please let me know.


I've enabled all of the "Update" logs in solr, and I don't see any records deleting my item.  Please let me know if that's not the right place.


Thanks,

Josh
Reply | Threaded
Open this post in threaded view
|

Re: Sitecore deleting Solr documents

Erick Erickson
Hmm, I'm not quite sure we can help you as this sounds like
Sitecore-specific functionality. Here's my total guess anyway. The
docs are somehow getting
indexed directly to CD and CD is a slave to CM. So the next time a
replication is triggered (see the settings in solrconfig.xml) the
index from CM overwrites the one on CD and CD no longer has the
documents. So when these docs disappear, you should see some messages
in the solr log about fetching the index from the master.

You could quickly test this by disabling replication which you can do
with the replication API without having to restart Solr or anything,
assuming that the SiteCore isn't issuing the commands instead of
relying on the standard polling mechanism, see:
https://cwiki.apache.org/confluence/display/solr/Index+Replication#IndexReplication-HTTPAPICommandsfortheReplicationHandler

This is totally guessing since I know nothing about how Sitecore
works. It's just one path I can imagine for the behavior you're
describing.

Best,
Erick

On Thu, Nov 3, 2016 at 8:18 PM, Joshua Campbell
<[hidden email]> wrote:

> Hi All,
> I'm having an odd issue with Solr, and am looking for some help or suggestions.
>
> We're using Solr (on a Sitecore website) for search and some search-driven pages. CM is pointing to a sitecore_master_index in Solr, while CD is pointing to a sitecore_web_index. We're using the OnPublishEndAsync strategy. Something really odd is happening.
>
> When we publish content, it shows up on CD (and the correct Solr index), then, about 90 seconds later, it's gone.
>
> If anybody has any insight into why this might happen, please let me know.
>
>
> I've enabled all of the "Update" logs in solr, and I don't see any records deleting my item.  Please let me know if that's not the right place.
>
>
> Thanks,
>
> Josh