# Support for alias mapping in enterprise search application

**URL:** <https://discuss.elastic.co/t/support-for-alias-mapping-in-enterprise-search-application/365701>\
**Category:** Elasticsearch\
**Created:** [August 28, 2024, 2:32pm UTC](https://discuss.elastic.co/t/support-for-alias-mapping-in-enterprise-search-application/365701 "2024-08-28T14:32:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravi\_kumar\_mvs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravi_kumar_mvs/32/132685_2.png) [@ravi\_kumar\_mvs](https://discuss.elastic.co/u/ravi_kumar_mvs)\
**Post date:** [August 28, 2024, 2:32pm UTC](https://discuss.elastic.co/t/support-for-alias-mapping-in-enterprise-search-application/365701/1 "2024-08-28T14:32:46Z")

</div>

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.

```auto
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 :

```auto
{
                "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?

---

<div class="post-metadata">

**Author:** ![ravi\_kumar\_mvs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravi_kumar_mvs/32/132685_2.png) [@ravi\_kumar\_mvs](https://discuss.elastic.co/u/ravi_kumar_mvs)\
**Post date:** [August 28, 2024, 2:37pm UTC](https://discuss.elastic.co/t/support-for-alias-mapping-in-enterprise-search-application/365701/2 "2024-08-28T14:37:44Z")

</div>

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?

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

```
