0

I have a Sitecore 8.1-3 instance that uses Solr. I recently had to go and fix some mongo data in the Contact collection that was incorrect. I wrote a script that fixed the data errors. I am wondering if the Sitecore analytics index will eventually figure this out and update the index. Right now when I do a search in the Experience Profile I am still seeing the old data. I know that you can re-index the analytics database by completely rebuilding the reporting database. I really don't want to do that unless absolutely necessary. I am hoping that Sitecore has some automated way that the analytics index eventually fixes itself. Anyone know?

  • @Corey, does the link Andrey refer to answer your question? if so, I'll close this one up as a duplicate – Mark Cassidy Jan 17 '17 at 1:19
  • I suppose they are pretty close questions. You can close this one if you like. – Corey Burnett Jan 17 '17 at 13:39
0

The Reporting Database, analytics index, and Mongo, all share a special relationship. they require all three repositories of data to be insync. for the most part, analytics database is kept up to date during processing tasks.

However, once contact data and interaction data has been processed, in most cases, processing won't reprocess that information. a good example of this is if data is removed from xDB (mongo).

in the event that any one of these three repositories get out of sync with each other, the best way to "fix" it, is to rebuild the reporting database.

Full walk through of rebuilding the reporting database can be found here.

Otherwise, there is no concrete way to update the analytics index or reporting databse.

Expanding Further

After talking with Corey on Slack, his exact issue is that he updated facet information, like names, in MongoDB directly.

Alternatively, without rebuilding the reporting database, you can write code that utilizes ContactRepository and ContentSearch to systematically update the Contact record, performing a SaveAndFlushToXdb() method. This will execute the appropriate processing tasks to update both the analytics index as well as reporting databse.

  • Hmmm - so are you suggesting that you should never add/edit/delete mongo data directly? It sounds like if I was to write code that would add, edit or delete mongo data then it would never be reflected in the analytics index because Sitecore would never know to process it. – Corey Burnett Jan 16 '17 at 19:42
  • I wouldn't, but that doesn't mean that Sitecore would never see it, but there scenarios that exist where it wouldn't. Whenever possible, I always recommend using the Sitecore API provided to edit xDB. I also feel that there can be use cases that exist that might require the need for a rebuild of the reporting databse periodically (infrequent at best). – Pete Navarra Jan 16 '17 at 19:52

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