Class GetDocumentOptions<T>
java.lang.Object
com.azure.search.documents.models.GetDocumentOptions<T>
- Type Parameters:
T- The type of the document to retrieve.
Additional parameters for getDocument operation.
-
Constructor Summary
ConstructorsConstructorDescriptionGetDocumentOptions(String key, Class<T> modelClass) Creates an instance ofGetDocumentOptionswith required parameters. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()Get the key property: The key of the document to retrieve.Get the modelClass property: The model class converts search result.Get the selectedFields property: The list of fields to retrieve.Get the enableElevatedRead property: A value that specifies whether to enable elevated read for the document retrieval.setElevatedReadEnabled(Boolean enableElevatedRead) Set the enableElevatedRead property: A value that specifies whether to enable elevated read for the document retrieval.setSelectedFields(String... selectedFields) Set the selectedFields property: The list of fields to retrieve.setSelectedFields(List<String> selectedFields) Set the selectedFields property: The list of fields to retrieve.
-
Constructor Details
-
GetDocumentOptions
Creates an instance ofGetDocumentOptionswith required parameters.- Parameters:
key- The key of the document to retrieve.modelClass- The model class converts search result.
-
-
Method Details
-
getKey
Get the key property: The key of the document to retrieve.- Returns:
- the key value.
-
getModelClass
-
getSelectedFields
-
setSelectedFields
Set the selectedFields property: The list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included.- Parameters:
selectedFields- the selectedFields value to set.- Returns:
- the GetDocumentOptions object itself.
-
setSelectedFields
Set the selectedFields property: The list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included.- Parameters:
selectedFields- the selectedFields value to set.- Returns:
- the GetDocumentOptions object itself.
-
isElevatedReadEnabled
Get the enableElevatedRead property: A value that specifies whether to enable elevated read for the document retrieval. Elevated read allows the request to read the latest committed index changes and bypass standard ACL filtering.- Returns:
- the enableElevatedRead value.
-
setElevatedReadEnabled
Set the enableElevatedRead property: A value that specifies whether to enable elevated read for the document retrieval. Elevated read allows the request to read the latest committed index changes and bypass standard ACL filtering.- Parameters:
enableElevatedRead- the enableElevatedRead value to set.- Returns:
- the GetDocumentOptions object itself.
-