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 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 Result Template Options.The Size.The Sort Properties. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal com.microsoft.graph.serializer.AdditionalDataManager
void
setRawObject
(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. -
contentSources
@SerializedName(value="contentSources", alternate="ContentSources") @Expose @Nullable public List<String> contentSourcesThe 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 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: 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
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
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. 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 resultTemplateOptionsThe Result Template Options. Provides the search result templates options for rendering connectors search results. -
size
The Size. The size of the page to be retrieved. 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:
additionalDataManager
in 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:
setRawObject
in interfacecom.microsoft.graph.serializer.IJsonBackedObject
- Parameters:
serializer
- the serializerjson
- the JSON object to set this object to
-