In case you are upgrading to version 9.7 or higher and want to benefit from the full text search the aggregates that you already have stored in database must be indexed. As it is important that also system set attributes are indexed, this cannot be a database operation, and a filled runtime profile is needed. We have created a special service that allows you to just index aggregates without updating them in the database. The first step is to create the service definition in studio, and then call it in an appropriate flow.
Step-by-step guide to add the service
- In Studio add a custom service named
AQ_Aggregate_Index_Migrate
- The service definition looks like this:
- The aggregateId is always required.
The aggregate version is optional. In case this is not specified, the latest version of an aggregate will be indexed.
We need a service that is able to update an aggregate. This service has the following parameters:
Parameter Direction Value Data Type Description Fill AggregateType Input Module Element Aggregate Select the aggregate that you want to update. Required AggregateID Input Expression Integer Please provide the attribute containing the ID of the aggregate entry to index. Required AggregateVersion Input Expression Integer If a specific version of the aggregate needs to be updated. If not provided then the latest one is updated. Optional StoreInstances Input Expression Entity Specify the starting point instance(s) used for storage. Optional Event Name Event Type Description AppException Cancel The service takes this exit if indexing failed for some reason.
Step-by-step guide to model the migration flow
The service you defined can be use in a flow like this:
- A project that wants to index the aggregates has to create an exposed migration flow.
- This flow should be called for every aggregate Id in the database. It can be passed as a parameter in the URL, and retrieved from there with the
BB_SetRequestParameters
service. - In this flow you then call the
AQ_AggregateRead
to load the existing aggregates into the profile. - The next step is to use the
AQ_Aggregate_Index_Migrate
service to add the aggregate index.
The code to query the dossier database, to select the applicable Ids, and passing them one by one to the exposed flow is left to the project team.
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels. Note: the article itself also appears as related article, this is a known limitation.