Apply Access Control on single field

Hi, All field-level security documentation examples, apply access control on field of an index. But is there any way to apply it on field of a specific document?

Welcome to our community! :smiley:

Do you mean you want to apply it to just a single document in the entire index?

1 Like

Thank you for your help, Yes exactly!
For example, I have an index named "Movies" with a "releaseDate" field and there are two documents in it called "Godfather" and "Titanic". I just want to grant role1 read privilege to Godfather's releaseDate but not to Titanic's. Is that possible?

No, Field Level Security works by hiding the field (in the index) entirely. You can't hide it in a single document.

You'll need to use different fields if the documents need different security.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.