ListManager – Contacts are not updated

Purpose of this articles is to explain a problem I recently faced while using Sitecore List Manager and how I fixed the issue.

The List Manager application is used to create and manages lists, that other applications and modules(like EXM) will be using. The List Manager uses Analytic index (sitecore_analytics_index) to populate the data(contact information) in the list.

When Contacts are added manually or imported through CSV file in List Manager, the contacts were not getting updated in the list and I was getting the below message.

List_issue.png

I tried rebuilding the list index and reporting database, but still the contacts were not getting listed. And also, I tried all the possible solution in the following article which contains the most popular indexing issues: https://kb.sitecore.net/articles/577247. But still the issue persisted.

Note: Also consider Solr version compatibility with Sitecore version which you used. Details can be found here https://kb.sitecore.net/articles/227897

After further investigation, I found that the contact details are updated in the Analytics index against the list ID. However, only the details(contact information) are not displayed on the List Manager.

Finally, I was able to identify that the behavior occurs, because of the application-specific index configuration changes in the Commerce Index file (CommerceServer.ContentSearch.Solr.DefaultIndexConfiguration)  which was overwriting the default index configuration (Sitecore.ContentSearch.Solr.DefaultIndexConfiguration). Our changes in the commerce index file was overwriting the default configuration on how to index field of list of string/text type.

The below line in the commerce index config specifies to index field of  “textCollection” type with ”_tm’

<typeMatch type=”System.Collections.Generic.List`1[System.String]” typeName=”textCollection” fieldNameFormat=”{0}_tm” multiValued=”true” settingType=”Sitecore.ContentSearch.SolrProvider.SolrSearchFieldConfiguration, Sitecore.ContentSearch.SolrProvider”patch:source=”CommerceServer.ContentSearch.Solr.DefaultIndexConfiguration.config”/>

However, the default index configuration specifies to index field of  “stringCollection” type with ”_sm’.

However, Sitecore while building the query to search the Analytics index for list information, uses ‘_sm’ type for the field, like below

?q=(type_t:(contact) AND contact.tags_sm:(ContactLists\:\{770B0D5C-F9F4-4F56-B572-EBA0FC130E06\}))&rows=0&fq=_indexname:(sitecore_analytics_index) 

So, there was a mismatch on how the field(contact.tags) is referred to  ‘_sm’ in the search query and ‘_tm’ in the index, due to this mismatch 0 contacts are returned for the query, though they are in the index.

This is not expected behavior. So we raised this issue to Sitecore support and they checked and confirmed it is a bug and has registered it as a bug in their bug tracking system.

There are two workaround solution to fix this issue, which are mentioned below:

Option 1:

1. Commented out the below line in the application specific(Sitecore Commerce enabled) config file (CommerceServer.ContentSearch.Solr.DefaultIndexConfiguration)

 <typeMatch type=”System.Collections.Generic.List`1[System.String]” typeName=”textCollection” fieldNameFormat=”{0}_tm” multiValued=”true” settingType=”Sitecore.ContentSearch.SolrProvider.SolrSearchFieldConfiguration, Sitecore.ContentSearch.SolrProvider”patch:source=”CommerceServer.ContentSearch.Solr.DefaultIndexConfiguration.config”/>

2. Replaced all returnType references (returnType=”textCollection”) in configuration with value returnType=”stringCollection”

Option 2:

1. Kept the below entry in the application specific config file (CommerceServer.ContentSearch.Solr.DefaultIndexConfiguration)

<typeMatch type=”System.Collections.Generic.List`1[System.String]” typeName=”textCollection” fieldNameFormat=”{0}_tm” multiValued=”true” settingType=”Sitecore.ContentSearch.SolrProvider.SolrSearchFieldConfiguration, Sitecore.ContentSearch.SolrProvider”patch:source=”CommerceServer.ContentSearch.Solr.DefaultIndexConfiguration.config”/>

2. Manually set how “contact.tags” field (used by Sitecore to build query) should be indexed by setting fieldMap in “Sitecore.ContentSearch.Solr.Index.Analytics” file .

List_field set

Finally, both the options worked !!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s