ContentIndexer class

Applies to Windows only

Enables Windows Store apps to place content properties in the system index.

Syntax


var contentIndexer = Windows.Storage.Search.ContentIndexer.getIndexer(string);
var contentIndexer = Windows.Storage.Search.ContentIndexer.getIndexer();

Attributes

[MarshalingBehavior(Agile)]
[Version(0x06030000)]

Members

The ContentIndexer class has these types of members:

Methods

The ContentIndexer class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
AddAsync Adds app-defined items with properties and content to the system index.
CreateQuery(String, IIterable(String)) Builds a query with the specified search filter and identifies which properties to retrieve.
CreateQuery(String, IIterable(String), IIterable(SortEntry)) Builds a query with the specified search filter, sort order, and identifies which properties to retrieve.
CreateQuery(String, IIterable(String), IIterable(SortEntry), String) Builds a query with the specified search filter, sort order, filter language, and identifies which properties to retrieve.
DeleteAllAsync Removes all app-defined items from the ContentIndexer.
DeleteAsync Removes the specified app-defined item from the ContentIndexer.
DeleteMultipleAsync Removes the specified app-defined items from the ContentIndexer.
GetIndexer() Gets an existing per-app index or creates a new one, if necessary.
GetIndexer(String) Gets the per-app index with the specified name or creates a new one, if necessary.
RetrievePropertiesAsync Gets content properties based on the given content identifier.
UpdateAsync Updates app content and properties in the ContentIndexer.

 

Properties

The ContentIndexer class has these properties.

PropertyAccess typeDescription

Revision

Read-onlyGets the version of the ContentIndexer.

 

Remarks

The index is a cache of searchable properties for data that's backed by storage elsewhere. Don't use the index as a primary data store.

Define properties for the index with 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.

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

Also, you can 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.

For more information, see the Windows Property System.

Define properties for the index with 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. The keys should be described as standard Windows property canonical names.

Content is separated per app package, per user, and a package can't query another package's data.

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

Windows.Storage.Search
Windows::Storage::Search [C++]

Metadata

Windows.winmd

See also

ContentIndexerQuery
IndexableContent
QueryOptions
StorageFileQueryResult
StorageFolderQueryResult
StorageItemQueryResult
Windows Property System
Object

 

 

Show:
© 2014 Microsoft. All rights reserved.