Why are an attribute's values missing from Advanced Search when the profile shows them?

Problem

  • A profile shows a value for an attribute, for example Region, but Advanced Search shows "No data available" for it, and searching for the value returns no profiles.
  • exists(attributes.Region) returns 0 for the entity type, and a facet on the attribute returns no values.
  • Reindexing doesn't help.

Cause

The same attribute name is defined with incompatible types on different entity types, for example as a Nested attribute on EntityTypeA and as a simple String attribute on EntityTypeB. Advanced Search uses Elasticsearch, which doesn't allow two attributes with the same name and different data types. Reltio documents this as Validation Error Code 1960 (METADATA_ATTRIBUTE_WITH_DIFFERENT_TYPES).

Only types in the same group are compatible, such as Long, Int, and Integer, or String and Blob. Nested isn't compatible with any type, so the values of one definition aren't indexed. They're still stored on the profile, so only search is affected, and a reindex doesn't help because the conflict is in the configuration.

Diagnose

{TenantURL} is https://<environment>.reltio.com/reltio/api/<tenantId>.

  1. Confirm that the attribute isn't indexed. This returns {"total": 0} even though profiles have a value:

     GET {TenantURL}/entities/_total?filter=equals(type,'configuration/entityTypes/EntityTypeB') and exists(attributes.Region)
  2. Get the configuration with GET {TenantURL}/configuration, and compare the type of every attribute named Region. A Nested definition next to a simple one, or two simple types from different groups, confirms the cause.

Solution

Give one of the definitions a different name. An attribute's name can't be edited, so:

  1. Add a new attribute with the new name and the same settings, such as its lookup and search settings.
  2. Update the match rules, survivorship rules, and integrations that refer to the old attribute.
  3. Load the existing values into the new attribute.
  4. Remove the old attribute definition.
  5. Run a full-tenant reindex: POST {TenantURL}/reindex?enableSeparateIndexing=true&distributed=true.

Renaming the Nested attribute fixes every entity type that uses the simple attribute at once.

Verify

The Diagnose step 1 request for the renamed attribute returns the expected count, and Advanced Search lists its values.

Prevent

Use attribute names that are unique across entity types. If you reuse a name, keep the same or a compatible type.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.