Skip to content

Latest commit

 

History

History
36 lines (21 loc) · 2.41 KB

contentindexer.md

File metadata and controls

36 lines (21 loc) · 2.41 KB
-api-id -api-type
T:Windows.Storage.Search.ContentIndexer
winrt class

Windows.Storage.Search.ContentIndexer

-description

Enables UWP apps to make private content searchable by using the system index.

-remarks

The ContentIndexer class enables apps to push a property bag into the system index which can later be searched quickily by the app or user. The property bag can contain any properties from the shell property system and is available to search instantly after the API call returns.

The properties are defined as string-object key-value pairs, where the keys are standard Windows property names, like System.Author, and the values are PropertyValue instances. The property must be registered on the system and have isColumn and isInvertedIndex set to true. You can also provide full-text search content by using a stream and content type. This corresponds to running the IFilter implementation for the type and indexing the content.

You can query over content by using Advanced Query Syntax (AQS).

Don't use the index as a primary data store, the index is only a cache of searchable properties. All data in the index must be stored elsewhere in case the cache is lost. Content is separated per app package and per user. A package can't query another package's data, but the operating system can access any data that is pushed in.

For more information on the properties available to use, see the Windows Property System.

-examples

Content indexer sample (Windows 10)

Video Walkthrough of a demo app

-see-also

ContentIndexerQuery, IndexableContent, QueryOptions, StorageFileQueryResult, StorageFolderQueryResult, StorageItemQueryResult, Windows Property System