CQL search after a migration

Hi, as part of our app’s migration process, we need to process pages migrated by the client to transform server macros to a format that is recognized by the cloud counterpart.

To do that, we run a cql search on pages in the instance when we receive a migration event.
BUT, it seems like the cql search is not reliable. For instance, running a CQL search (/rest/api/search?cql=type%3Dpage+AND+macro%3D%22requirement%22&limit=20) doesn’t return any result before a page is manually created (Not containing the requirement macro), after which, the search finally responds with the pages migrated containing the requirement macro.

My question is: did I find a bug? Or how long should we wait after a migration to make sure that Atlassian has finished processing pages in the backend before running the search?

Thanks, and best regards, Corentin.

Hi @Corentin,

There’s no defined time to wait, but you will need to wait a while before the site is fully indexed. You have a few options, one is to just set a defined delay, or run the process to updates pages several time as pages are indexed. You could also provide a manual button for customers to re-trigger the conversion as well post-migration.

You also have access to the list of pages or spaces that were migrated so you can narrow your cql down though these API calls

Hope this helps.
James Richards
Senior Developer Support Engineer