Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When an aggregate is updated, it is marked as changed for the search functionality, and is indexed at the next synchronization moment (How to configure full-text index synchronization). There exist two scenarios in which you want to start the indexing manually, without updating the stored aggregate itself.

  1. 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.
  2. In case that all your aggregates already are indexed and a new version of the model is published to production wit new business logic, you want to re-index all aggregates so that changed derived values can be found during the search.

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.

UI Text Box
typeinfo

This service is not a standard service, and it is not part of the AquimaLibrary. You have to ask for the code at support@blueriq.com and add the definition to the globals manually.

 

Step-by-step guide to add the service

  1. In Studio add a custom service named AQ_Aggregate_Index_Migrate
  2. The service definition looks like this:


  3. 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:

     

    ParameterDirectionValueData TypeDescriptionFill
    AggregateTypeInputModule ElementAggregateSelect the aggregate that you want to update.Required
    AggregateIDInputExpressionIntegerPlease provide the attribute containing the ID of the aggregate entry to index.Required
    AggregateVersionInputExpressionIntegerIf a specific version of the aggregate needs to be updated. If not provided then the latest one is updated.Optional
    StoreInstancesInputExpressionEntitySpecify the starting point instance(s) used for storage.Optional

     

    Event NameEvent TypeDescription
    AppExceptionCancelThe 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:

...