0

In a Sitecore Experience Platform version 9.1.1 instance, List Manager is maintaining lists for a number of contacts. One of these lists has 130,000+ contacts. you can see that this is working and indexed as expected when I view the Contact List Details as shown below (contact information has been blurred out):

enter image description here

I am looking for a specific contact that I KNOW is in this list. As an example, I can export the list to a CSV file, and I can find my contact.

HOWEVER, when using the "Search Box" in the Contact List Detail screen, it doesn't matter what I put in here, email address, name, etc.. stuff that I know is in the list... I get ZERO results. as shown in this image:

enter image description here

What am I doing wrong here? This is happening on EVERY list in List Manager, regardless of the size of the list.

UPDATE 1 (In Response to x3mxray answer): I'm positive that I'm using the search correctly, here's a more concrete example. This is a list with 3300+ contacts in it. The email addresses and last names have been scrubbed for the purpose of posting here.. but I've left the first names.

enter image description here

If I do a search for "ROBERT", it generates the following URL in the Network tab: https://cm.domain.com/sitecore/api/lists/1bbd39b3-9a3d-4187-b4e2-c7a49da9fea1/contacts?pageSize=20&pageIndex=0&payLoad=full&language=en&filter=ROBERT

And the page provides the following results: enter image description here

5
  • Have you checked what's in the index? And what query is sent to Solr? Dec 9 '20 at 19:22
  • Can you make sure you use the right case. I know that index is case sensitive.
    – Chris Auer
    Dec 9 '20 at 20:05
  • Yes Index is perfect.. List Manager works correctly (the lists are usable in EXM, personalization, etc.) It's JUST this Search box.. that doesn't return anything. I've used exact cases... and exact strings and it just returns no results. Dec 10 '20 at 4:17
  • I seem to remember there was a bug in the js code (9.0.1) that failed to implement the search filter...not sure what version it was fixed in. Does the js XHR request when executing the search include the filter param in querystring? Is the Contact search box in EXM working? Also worth checking, are you indexing "PII" data (email etc) via the IndexPIISensitiveData config in the indexer? Dec 10 '20 at 7:34
  • Can you check network tab in Google Chrome that why it is not returning anything, could that the ajax call fails when you are doing the search. Dec 10 '20 at 9:16
0

1. PIISensitive data

Searching FirstName, LastName and Email have following mapping to XConnect contact fields:

FirstName == contact.Personal().FirstName
LastName == contact.Personal().LastName
EmailAddress == contact.Emails().PreferredEmail.SmtpAddress

In Sitecore 9.1.1 all these fields are marked with [PIISensitive] attribute:

// Decompiled with JetBrains decompiler
// Type: Sitecore.XConnect.Collection.Model.PersonalInformation
// Assembly: Sitecore.XConnect.Collection.Model, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 865010DA-9242-4A5D-B3EE-1E6E9A98ACA5

  [FacetKey("Personal")]
  [Serializable]
  public class PersonalInformation : Facet
  {
    public const string DefaultFacetKey = "Personal";

    [PIISensitive]
    public DateTime? Birthdate { get; set; }

    [PIISensitive]
    public string FirstName { get; set; }

    [PIISensitive]
    public string MiddleName { get; set; }

    [PIISensitive]
    public string LastName { get; set; }

    public string Gender { get; set; }

    public string JobTitle { get; set; }

    [PIISensitive]
    public string Nickname { get; set; }

    public string Suffix { get; set; }

    public string Title { get; set; }

    public string PreferredLanguage { get; set; }
  }


  [Serializable]
  public class EmailAddress
  {
    public EmailAddress(string smtpAddress, bool validated)
    {
      this.SmtpAddress = smtpAddress;
      this.Validated = validated;
    }

    public bool Validated { get; set; }

    [PIISensitive]
    public string SmtpAddress { get; set; }

    public int BounceCount { get; set; }
  }

So if you do not indexing PII sensitive information you can enabled its indexing/querying: How do you properly query xdb for a contact by email?

2. List Manager contacts search with filter

List Manager search for exact matching (not substring) of your search term with FirstName, LastName and EmailAddress facet values. It is not working even if you add extra whitespace in search term. And also search is case insensitive.

It works OK for me in Sitecore.NET 9.1.1 (rev. 002459). enter image description here Request looks following: /sitecore/api/lists/{listId}/contacts?pageSize=20&pageIndex=0&payLoad=full&language=en&filter={search_term}.

Executed filter code is (decompiling Sitecore.ListManagement.XConnect.dll from 9.1.1 installation):

// Decompiled with JetBrains decompiler
// Type: Sitecore.ListManagement.XConnect.Sources.FilteringSource
// Assembly: Sitecore.ListManagement.XConnect, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 495B0D08-695A-408C-9ACC-7A79C28AD9F6

  public class FilteringSource : IContactSource
  {
    public FilteringSource(IContactSource contactSource, string searchFilter)
    {
      Condition.Requires<IContactSource>(contactSource, nameof (contactSource)).IsNotNull<IContactSource>();
      this.ContactSource = contactSource;
      this.SearchFilter = searchFilter;
    }

    public IContactSource ContactSource { get; }

    public string SearchFilter { get; }

    public virtual IContactSearchQueryFactory GetQuery()
    {
      IContactSearchQueryFactory query = this.ContactSource.GetQuery();
      if (query == null)
        return (IContactSearchQueryFactory) null;
      if (string.IsNullOrEmpty(this.SearchFilter))
        return query;
      return (IContactSearchQueryFactory) new AndQueryFactory()
      {
        LeftOperand = query,
        RightOperand = (IContactSearchQueryFactory) new OrQueryFactory()
        {
          LeftOperand = (IContactSearchQueryFactory) new EmailAddressMatches(this.SearchFilter, StringOperationType.IsCaseInsensitiveAndEqualTo),
          RightOperand = (IContactSearchQueryFactory) new OrQueryFactory()
          {
            LeftOperand = (IContactSearchQueryFactory) new FirstNameMatches(this.SearchFilter, StringOperationType.IsCaseInsensitiveAndEqualTo),
            RightOperand = (IContactSearchQueryFactory) new LastNameMatches(this.SearchFilter, StringOperationType.IsCaseInsensitiveAndEqualTo)
          }
        }
      };
    }
  }

As you can see it uses StringOperationType.IsCaseInsensitiveAndEqualTo operator for matching filter results.

2
  • Hi thanks for the answer.. see my update in the question responding to this. As you can tell, I'm following your #2 recommendation. Are you saying that I need to turn PII off of this field in order for Sitecore to search it? I feel like that's incorrect. Dec 10 '20 at 16:02
  • This is also happening on three other different sitecore installs from version 9.1 to 9.3. Dec 10 '20 at 16: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.