public CreateIndexRequest withUserContextPolicy(String userContextPolicy) {
        setUserContextPolicy(userContextPolicy);
        return this;
    }
<p>
The user context policy.
</p>
<dl>
<dt>ATTRIBUTE_FILTER</dt>
<dd>
<p>
All indexed content is searchable and displayable for all users. If you want to filter search results on user
context, you can use the attribute filters of <code>_user_id</code> and <code>_group_ids</code> or you can
provide user and group information in <code>UserContext</code>.
</p>
</dd>
<dt>USER_TOKEN</dt>
<dd>
<p>
Enables token-based user access control to filter search results on user context. All documents with no access
control and all documents accessible to the user will be searchable and displayable.
</p>
</dd>
</dl>

@param userContextPolicy
       The user context policy.</p>
       <dl>
       <dt>ATTRIBUTE_FILTER</dt>
       <dd>
       <p>
       All indexed content is searchable and displayable for all users. If you want to filter search results on
       user context, you can use the attribute filters of <code>_user_id</code> and <code>_group_ids</code> or
       you can provide user and group information in <code>UserContext</code>.
       </p>
       </dd>
       <dt>USER_TOKEN</dt>
       <dd>
       <p>
       Enables token-based user access control to filter search results on user context. All documents with no
       access control and all documents accessible to the user will be searchable and displayable.
       </p>
       </dd>
@return Returns a reference to this object so that method calls can be chained together.
@see UserContextPolicy
aws-java-sdk-kendra/src/main/java/com/amazonaws/services/kendra/model/CreateIndexRequest.java