1

We are running Solr 5.5.4 and Sitecore 8.2.3. Our collection for the web index occasionally has multiple versions of an item in it. This is causing problems with some of our older search queries that only expect 1 or no documents returned for an item, which is expected in the web database, since we are not doing any A/B content testing.

I found a nice Solr query to run, to see if there are any duplicated items: https://[solr]:8983/solr/sitecore_web_index/select?facet.field=_group&facet=on&indent=on&q=_language:en&wt=json&facet.mincount=2&facet.limit=2147483647&rows=0

When we rebuild the index, it rebuilds where this query returns no facet_fields items. But after a few days of publishes, a few items creep into this list.

We haven't found another event that seems to be correlated to when these occur. The one thing we have noted is that the older version of the item gets an _indextimestamp value of 10-90 seconds after the new one's _indextimestamp value. So it almost seems like some event is occurring to update/recreate an old item after the new one gets created.

We do use workflow for publishing content. What process is it that removes the old version of an item from the web database?

I've scoured the logs and don't see any logged errors around the times where the new or old items are being created.

I'm not sure where to look next.

1
  • On your target database, does the items have more than 1 version? Jun 15, 2018 at 19:06

1 Answer 1

1

Have you tried sitecore support?

Do you have a patched crawler?

There are a couple of bugs I've encountered which result in duplicate items in the web database. Which require patches from support.

One bug only shows itself when using ContentSearch.Indexing.DisableDatabaseCaches=true

The other shows itself when you unpublish a version of an item. And you end up with an empty item in the index (other than shared fields)

As a temporary work around rebuilding the index fixes it, as you have found.

If you look in the Solr logs and pay close attention to the version number being indexed for any add/update/delete operation, you might see it deletes a version of the item from the index corectly on an unpublish, and then re-add a version 1 of the item even though version 1 isn't in the web database.

1
  • Thank you @Ian. Looking at our configs, we do have ContentSearch.Indexing.DisableDatabaseCaches== true. We also use Unpublish at times. So these are excellent places to start looking at Jun 15, 2018 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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