'Elastic Exclude fields while creating alias

I am trying to create the alias index for existing index , during this process wanted to create alias by excluding certain fields.Please let me know how to achieve.

POST /_aliases
{
    "actions": [
        {
            "add": {
                "index": "emp_dtl*",
                "alias": "emp_dtl_alias"
            }
        }
    ]
}        

Thanks in Advance,

Siva Kumar



Solution 1:[1]

What you're looking for is field-level security and it is a commercial feature.

If a commercial license is not an option for you and if your users don't have access directly to your Elasticsearch instance, you can use source filtering on your alias to only return the fields they are allowed to see, but it is not recommended to pretend that it's a secure way of excluding fields from your aliased view.

Document-level security is also a commercial feature. You can exclude documents from your alias view using a filtered alias, but it is also not recommended to pretend that it's a secure way of excluding documents.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Val