Package com.microsoft.graph.models
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 Summary
FieldsModifier and TypeFieldDescriptionThe Aggregation Filters.The Aggregations.The Collapse Properties.The Content Sources.The Enable Top Results.The Entity Types.The Fields.The From.the OData type of the object as returned by the serviceThe Query.The Query Alteration Options.The Region.The Result Template Options.The Share Point One Drive Options.The Size.The Sort Properties. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal com.microsoft.graph.serializer.AdditionalDataManagervoidsetRawObject(com.microsoft.graph.serializer.ISerializer serializer, com.google.gson.JsonObject json) Sets the raw JSON object
-
Field Details
-
oDataType
the OData type of the object as returned by the service -
aggregationFilters
@SerializedName(value="aggregationFilters", alternate="AggregationFilters") @Expose @Nullable public List<String> aggregationFiltersThe 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> aggregationsThe Aggregations. Specifies aggregations (also known as refiners) to be returned alongside search results. Optional. -
collapseProperties
@SerializedName(value="collapseProperties", alternate="CollapseProperties") @Expose @Nullable public List<CollapseProperty> collapsePropertiesThe Collapse Properties. Contains the ordered collection of fields and limit to collapse results. Optional. -
contentSources
@SerializedName(value="contentSources", alternate="ContentSources") @Expose @Nullable public List<String> contentSourcesThe Content Sources. Contains the connection to be targeted. -
enableTopResults
@SerializedName(value="enableTopResults", alternate="EnableTopResults") @Expose @Nullable public Boolean enableTopResultsThe 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> entityTypesThe Entity Types. One or more types of resources expected in the response. Possible values are: event, message, driveItem, externalItem, site, list, listItem, drive, chatMessage, person, acronym, bookmark. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum:chatMessage, person, acronym, bookmark. See known limitations for those combinations of two or more entity types that are supported in the same search request. Required. -
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 the content that Microsoft Graph connectors bring in. The fields property can use the semantic labels applied to properties. For example, if a property is labeled as title, you can retrieve it using the following syntax: label_title. Optional. -
from
The From. Specifies the offset for the search results. Offset 0 returns the very first result. Optional. -
query
The Query. Contains the query terms. Required. -
queryAlterationOptions
@SerializedName(value="queryAlterationOptions", alternate="QueryAlterationOptions") @Expose @Nullable public SearchAlterationOptions queryAlterationOptionsThe Query Alteration Options. Query alteration options formatted in a JSON blob that contains two optional flags related to spelling correction. Optional. -
region
The Region. The geographic location for the search. Required for searches that use application permissions. For details, see Get the region value. -
resultTemplateOptions
@SerializedName(value="resultTemplateOptions", alternate="ResultTemplateOptions") @Expose @Nullable public ResultTemplateOption resultTemplateOptionsThe Result Template Options. Provides the search result template options to render search results from connectors. -
size
The Size. The size of the page to be retrieved. The maximum value is 500. Optional. -
sortProperties
@SerializedName(value="sortProperties", alternate="SortProperties") @Expose @Nullable public List<SortProperty> sortPropertiesThe 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:
additionalDataManagerin interfacecom.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:
setRawObjectin interfacecom.microsoft.graph.serializer.IJsonBackedObject- Parameters:
serializer- the serializerjson- the JSON object to set this object to
-