Idea ID: 1661314

SM - Smart Search - Support indexing of "Array of Structure" attributes

Status : Waiting for Votes
over 2 years ago

Due to the non-relational data model SM heavily relies on "array of structure" attributes.
Smart Search does currently not allow to index attributes within array of structures. There is in fact a validation in place (KMIDOLReplicatedDB.isFieldsExistingInFile) which is using the datadict record as the source to validate if the attributes configured are valid for the corresponding table. The problem is that array of structure elements are not listed within the datadict record at all.

After modifying the function KMIDOLReplicatedDB.isFieldsExistingInFile to skip the validation (return true always) we found out that in fact "Smart Search" is able to handle array of structures properly.

The array of structure elements are indexed properly and search works fine. The label shown within Smart Search Filter (Match) is taken in this case from the smart search configuration.

This idea is about to request proper support of array of structures wtihin SM Smart Search.

Suggestion: Maybe it makes sense to include the array of structure elements in the datadict record somehow? This would allow to configure the labels the same way as for other attributes?


1. Within a OOB SM system integrated with Smart Analytics go to the Smart Search Configuration for the Change Library
2. Add attribute sc.operator which is part of the cm3r.labor array of structure (see screenshot 1)
3. Save the configuration and trigger full reindex (see screenshot 2)
4. The system shows an error message (see screenshot 2)
5. See Function KMIDOLReplicatedDB.isFieldsExistingInFile (see screenshot 3) - this function does verify fields configured for index against the datadict record. Since the elements of an array of structure attribute are not listed in the datadict the function reports that the field is not valid
6. Adjust the function to return true always - see workaround in screenshot 3
7. Trigger Reindex again - the index is processed without issues and in fact the search and filter (match) does work properly as well. Maybe you need to make sure that cm3r.labor.sc_operator does contain some data before indexing