Support for alias mapping in enterprise search application

Hi,

We use search applications to wrap a bit of business logic and to reduce the network bandwidth usage.

The scenario that we have is to sync some data that is coming from a graphql call and keep the indexes UpToDate.

I thought that the best way to achieve this would be to create a dynamic index with the same source index schema and populating the data in the dynamic index. Post the copy, I would switch the alias.

But the issue here is that enterprise search applications don't support using aliases. They need a concrete index mapped to the search application definition.

curl --location --request PUT  '/_application/search_application/test-alias' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
  "indices": [
    "search-index-alias"
  ]
}'

the above call fails with the message :

{
                "type": "illegal_argument_exception",
                "reason": "The provided expression [search-index-alias] matches an alias, specify the corresponding concrete indices instead."
            }

Any thoughts about it, please?

At the moment, it looks like the best approach would be to update the search application index mapping with the newly created dynamic index. What do you guys feel about it?

curl --location --request PUT  '/_application/search_application/test-alias' \
--header 'Content-Type: application/json' \
--header 'Authorization: ApiKey *****' \
--data '{
  "indices": [
    "dynamic-index"
  ]
}'