But when i'm using the search api on elasticsearch i don't know how to specify my role? Maybe i don't understand how it's working. Can someone help me? Thanks.
EDIT : More details : in my nodejs app , when i want to search document i use the search API (GET /myIndex/_search/ {myQuery}) When i search i want to specify my role that i defined in x-pack) . Sorry if my english is bad
But when i'm using the search api on elasticsearch i don't know how to specify my role?
Roles pertain to users by a process called Role mapping and there is an API to configure it. In a request you identify as a user in a realm which will then have roles assigned to it which subsequently grant the user privileges over indices, docs and fields.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.