LocalContentSuggestionSettings.AqsFilter | aqsFilter property
An Advanced Query Syntax (AQS) string that limits the types and kinds of files that are used to provide suggestions. If no AQS string is specified, suggestions are provided from all local files in locations specified by the locations property.
Syntax
var aqsFilter = localContentSuggestionSettings.aqsFilter;
localContentSuggestionSettings.aqsFilter = aqsFilter;
Property value
Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]
The AQS string that is used to refine which local, indexed files are used to provide suggestions. By default, this string is empty. Learn more about AQS in Advanced Query Syntax (AQS).
Remarks
If local suggestions are disabled, this property has no effect. Set localContentSuggestionSettings.enabled property to true to display local suggestions in the search pane.
Use an AQS filter to help keep local suggestions relevant. For example, if your app is a video player, you may want to limit suggestions to videos or a specific file type.
Examples
The Search contract sample demonstrates how to use AQS to provide local suggestions from music files:
var localSuggestionSettings = new Windows.ApplicationModel.Search.LocalContentSuggestionSettings(); localSuggestionSettings.enabled = true; localSuggestionSettings.locations.append(Windows.Storage.KnownFolders.musicLibrary); localSuggestionSettings.aqsFilter = "kind:=music";
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
See also
- Advanced Query Syntax (AQS)
- Quickstart: Adding search
- Search contract sample
- Reference
- Object class
- LocalContentSuggestionSettings class
- SearchPane.SetLocalContentSuggestionSettings method
Build date: 12/4/2012
