Item Rich Search on a multi-occurring attribute returns incorrect results

If you run Item Rich Search on a multi-occurring attribute in a search template, then the result set includes items that appear to have incorrect values of the attribute.

Symptoms

Item Rich Search on a multi-occurring attribute returns incorrect results.

Causes

Incorrect interpretation of results returned by the Item Rich Search on a multi-occurring attribute.

Diagnosing the problem

The Item Rich Search on a multi-occurring attribute is designed to return all items that contain the search value for any occurrence of the attribute.

To illustrate this working of the Item Rich Search on a multi-occurring attribute, consider the following example. Consider a catalog that contains a list of DVDs from your personal collection. For simplicity, let the catalog spec contain only three attributes: MovieID, MovieTitle, and Actors. Because there can be many actors in a movie, we can define the Actors attribute as a multi-occurring attribute with minimum occurrence of 1 and maximum occurrence of 10.

When you search for a movie that has a certain actor, the result set contains all the movies that have this actor as one of the actors. However, when the search results are displayed in the Multi Edit UI screen, only the first value of that attribute is displayed. This means that if a certain record has this actor's name as the third actor, then the record is included in the result set but will display the name of the first actor in the Multi Edit UI screen. If you move your mouse pointer to the column header of the multi-occurring attribute, you see a tooltip that indicates that only the first occurrence of the attribute is displayed.

To verify this, you can highlight the record that you suspect to have been returned in error, and click Open to see the record in the Single Edit mode. In the Single Edit mode, you can see that the actor whose name you had included in the search operation is actually the third actor who is listed in the multi-occurring attribute Actors.

This behavior is true regardless of the type of the attribute, and regardless of the operator specified in the search criteria.