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.
var aqsFilter = localContentSuggestionSettings.aqsFilter; localContentSuggestionSettings.aqsFilter = aqsFilter;
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).
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.
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";
Minimum supported client
Minimum supported server
|Windows Server 2012|
- Advanced Query Syntax (AQS)
- Quickstart: Adding search
- Search contract sample
- Object class
- LocalContentSuggestionSettings class
- SearchPane.SetLocalContentSuggestionSettings method
Build date: 11/16/2013