Class SearchRequest

java.lang.Object
com.microsoft.graph.models.SearchRequest
All Implemented Interfaces:
com.microsoft.graph.serializer.IJsonBackedObject

public class SearchRequest extends Object implements com.microsoft.graph.serializer.IJsonBackedObject
The class for the Search Request.
  • Field Details

    • oDataType

      @SerializedName("@odata.type") @Expose @Nullable public String oDataType
      the OData type of the object as returned by the service
    • aggregationFilters

      @SerializedName(value="aggregationFilters", alternate="AggregationFilters") @Expose @Nullable public List<String> aggregationFilters
      The Aggregation Filters. Contains one or more filters to obtain search results aggregated and filtered to a specific value of a field. Optional.Build this filter based on a prior search that aggregates by the same field. From the response of the prior search, identify the searchBucket that filters results to the specific value of the field, use the string in its aggregationFilterToken property, and build an aggregation filter string in the format '{field}:/'{aggregationFilterToken}/''. If multiple values for the same field need to be provided, use the strings in its aggregationFilterToken property and build an aggregation filter string in the format '{field}:or(/'{aggregationFilterToken1}/',/'{aggregationFilterToken2}/')'. For example, searching and aggregating drive items by file type returns a searchBucket for the file type docx in the response. You can conveniently use the aggregationFilterToken returned for this searchBucket in a subsequent search query and filter matches down to drive items of the docx file type. Example 1 and example 2 show the actual requests and responses.
    • aggregations

      @SerializedName(value="aggregations", alternate="Aggregations") @Expose @Nullable public List<AggregationOption> aggregations
      The Aggregations. Specifies aggregations (also known as refiners) to be returned alongside search results. Optional.
    • contentSources

      @SerializedName(value="contentSources", alternate="ContentSources") @Expose @Nullable public List<String> contentSources
      The Content Sources. Contains the connection to be targeted. Respects the following format : /external/connections/connectionid where connectionid is the ConnectionId defined in the Connectors Administration. Note: contentSource is only applicable when entityType=externalItem. Optional.
    • enableTopResults

      @SerializedName(value="enableTopResults", alternate="EnableTopResults") @Expose @Nullable public Boolean enableTopResults
      The Enable Top Results. This triggers hybrid sort for messages: the first 3 messages are the most relevant. This property is only applicable to entityType=message. Optional.
    • entityTypes

      @SerializedName(value="entityTypes", alternate="EntityTypes") @Expose @Nullable public List<EntityType> entityTypes
      The Entity Types. One or more types of resources expected in the response. Possible values are: list, site, listItem, message, event, drive, driveItem, person, externalItem. See known limitations for those combinations of two or more entity types that are supported in the same search request. Required.
    • fields

      @SerializedName(value="fields", alternate="Fields") @Expose @Nullable public List<String> fields
      The Fields. Contains the fields to be returned for each resource object specified in entityTypes, allowing customization of the fields returned by default otherwise, including additional fields such as custom managed properties from SharePoint and OneDrive, or custom fields in externalItem from content that Microsoft Graph connectors bring in. The fields property can be using the semantic labels applied to properties. For example, if a property is label as title, you can retrieve it using the following syntax : label_title.Optional.
    • from

      @SerializedName(value="from", alternate="From") @Expose @Nullable public Integer from
      The From. Specifies the offset for the search results. Offset 0 returns the very first result. Optional.
    • query

      @SerializedName(value="query", alternate="Query") @Expose @Nullable public SearchQuery query
      The Query. Contains the query terms. Required.
    • queryAlterationOptions

      @SerializedName(value="queryAlterationOptions", alternate="QueryAlterationOptions") @Expose @Nullable public SearchAlterationOptions queryAlterationOptions
      The Query Alteration Options. Provides query alteration options formatted as a JSON blob that contains two optional flags related to spelling correction. Optional.
    • resultTemplateOptions

      @SerializedName(value="resultTemplateOptions", alternate="ResultTemplateOptions") @Expose @Nullable public ResultTemplateOption resultTemplateOptions
      The Result Template Options. Provides the search result templates options for rendering connectors search results.
    • size

      @SerializedName(value="size", alternate="Size") @Expose @Nullable public Integer size
      The Size. The size of the page to be retrieved. Optional.
    • sortProperties

      @SerializedName(value="sortProperties", alternate="SortProperties") @Expose @Nullable public List<SortProperty> sortProperties
      The Sort Properties. Contains the ordered collection of fields and direction to sort results. There can be at most 5 sort properties in the collection. Optional.
  • Constructor Details

    • SearchRequest

      public SearchRequest()
  • Method Details

    • additionalDataManager

      @Nonnull public final com.microsoft.graph.serializer.AdditionalDataManager additionalDataManager()
      Specified by:
      additionalDataManager in interface com.microsoft.graph.serializer.IJsonBackedObject
    • setRawObject

      public void setRawObject(@Nonnull com.microsoft.graph.serializer.ISerializer serializer, @Nonnull com.google.gson.JsonObject json)
      Sets the raw JSON object
      Specified by:
      setRawObject in interface com.microsoft.graph.serializer.IJsonBackedObject
      Parameters:
      serializer - the serializer
      json - the JSON object to set this object to