Class GetDocumentOptions<T>

java.lang.Object
com.azure.search.documents.models.GetDocumentOptions<T>
Type Parameters:
T - The type of the document to retrieve.

public final class GetDocumentOptions<T> extends Object
Additional parameters for getDocument operation.
  • Constructor Details

    • GetDocumentOptions

      public GetDocumentOptions(String key, Class<T> modelClass)
      Creates an instance of GetDocumentOptions with required parameters.
      Parameters:
      key - The key of the document to retrieve.
      modelClass - The model class converts search result.
  • Method Details

    • getKey

      public String getKey()
      Get the key property: The key of the document to retrieve.
      Returns:
      the key value.
    • getModelClass

      public Class<T> getModelClass()
      Get the modelClass property: The model class converts search result.
      Returns:
      the modelClass value.
    • getSelectedFields

      public List<String> getSelectedFields()
      Get the selectedFields property: The list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included.
      Returns:
      the selectedFields value.
    • setSelectedFields

      public GetDocumentOptions<T> setSelectedFields(String... selectedFields)
      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

      public GetDocumentOptions<T> setSelectedFields(List<String> selectedFields)
      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

      public Boolean 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

      public GetDocumentOptions<T> setElevatedReadEnabled(Boolean enableElevatedRead)
      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.