StorageProviderSearchQueryOptions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides options for a search query.
public ref class StorageProviderSearchQueryOptions sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Storage.Provider.CloudFilesContract, 458752)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class StorageProviderSearchQueryOptions final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Storage.Provider.CloudFilesContract), 458752)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class StorageProviderSearchQueryOptions
Public NotInheritable Class StorageProviderSearchQueryOptions
- Inheritance
- Attributes
Windows requirements
Device family |
Windows 11 Insider Preview (introduced in 10.0.23504.0)
|
API contract |
Windows.Storage.Provider.CloudFilesContract (introduced in v7.0)
|
Examples
The following is an example of how Windows would make a query using the cloud files search API:
MockSearchHandler searchHandler;
winrt::CloudSearch::StorageProviderSearchQueryOptions options = winrt::make<CloudSearch::implementation::StorageProviderSearchQueryOptions>(L"dog");
auto queryResult = searchHandler.Find(options);
if (queryResult.Status() == StorageProviderSearchQueryStatus::Success)
{
auto results = queryResult.GetResults();
for (auto result : results)
{
// Handle search results
}
}
else
{
// Handle error
}
Properties
FolderScope |
Gets the folder to which the search query should be scoped. |
Language |
Gets the language of the search query. |
MaxResults |
Gets the maximum number of results to return. |
ProgrammaticQuery |
Gets the programmatic query string for the search query which can include additional conditions not directly entered by the user. |
PropertiesToFetch |
Gets the vector of additional properties to return for the search query. |
QueryId |
Gets the unique identifier for the search query. This is a telemetry ID provided by the caller that allows the request to be tracked across the client and service for reliability proposes. |
SortOrder |
Gets the order that the results should be returned in, using rank as the default sort order. |
UserQuery |
Provides the original user query string entered in the UI. |