Language

AppContentIndexer Class

Definition

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

Creates, opens, and queries an index of your app's content. The index supports semantic and lexical search.

public ref class AppContentIndexer sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.Search.AppContentIndex.AppContentIndexContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class AppContentIndexer final : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.Search.AppContentIndex.AppContentIndexContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Experimental]
class AppContentIndexer final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.Search.AppContentIndex.AppContentIndexContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class AppContentIndexer : System.IDisposable
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.Search.AppContentIndex.AppContentIndexContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Experimental]
public sealed class AppContentIndexer : System.IDisposable
Public NotInheritable Class AppContentIndexer
Implements IDisposable
Inheritance
Object Platform::Object IInspectable AppContentIndexer
Attributes
Implements

Remarks

Use AppContentIndexer to create a searchable index of the content in your app, add text and image content to it, and then query it. For a walkthrough, see Get Started with App Content Search.

  • Apps that use AppContentIndexer must have package identity. To enable semantic indexing and text recognition (OCR), the app must also declare the systemaimodels capability.
  • An AppContentIndexer instance isn't associated with a particular thread; it is an agile object. Some methods can take considerable time, so call them from a background thread rather than the UI thread.
  • AppContentIndexer implements the IClosable interface (projected as IDisposable in C#). Close the indexer when you no longer need it so that it can release its underlying resources. If you open the same index more than once, close each instance. Opening and closing an index is expensive, so avoid doing it for every operation.
  • The index contains only the content that you add to it. If the source of that content (for example, a file) changes, your app must update the index.

Properties

Name Description
DefaultLanguage

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

IndexName

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

Listener

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

Methods

Name Description
AddOrUpdate(IndexableAppContent)

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

BatchAddOrUpdate(IIterable<IndexableAppContent>)
Close()

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

CreateImageQuery(String, ImageQueryOptions)

Creates a query that searches the indexed images for content that matches the specified text query phrase.

CreateImageQuery(String)

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

Creates a query that searches the indexed images for content that matches the specified text query phrase.

CreateImageQuerySession()

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

CreateTextQuery(String, TextQueryOptions)

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

Creates a query that searches the indexed text for content that matches the specified query phrase.

CreateTextQuery(String)

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

Creates a query that searches the indexed text for content that matches the specified query phrase.

CreateTextQuerySession()

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

DeleteIndex(String, DeleteIndexWhileInUseBehavior)

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetContentItems()

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

GetContentItems(QueryContentItemsFilterFlags)
GetContentItemsRequiringReindexing()

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

GetContentItemStatus(String)

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

GetContentItemStatuses(IIterable<String>)

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

GetContentStaticBoost(String)
GetExistingIndexes()

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

GetIndexCapabilities()

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

GetIndexCapabilitiesOfCurrentSystem()

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

GetIndexStatistics()

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

GetOrCreateIndex(String, GetOrCreateIndexOptions)

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

Opens the index with the specified name, or creates it if it does not exist, using the specified options.

GetOrCreateIndex(String)

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

Opens the index with the specified name, or creates it if it does not exist.

GetRegionStaticBoost(String, String)
IsContentKindSupported(RegionContentKind)

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

RemoveAllContentItems()

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

RemoveContentItem(String)

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

RemoveContentItems(IIterable<String>)

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

ResetAllStaticBoosts()
SetContentStaticBoost(String, Single)
SetRegionStaticBoost(String, String, Single)
WaitForIndexCapabilitiesAsync()

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

WaitForIndexingIdleAsync(TimeSpan)

Important

App Content Search is a Limited Access Feature. Before you ship an app that uses APIs in this namespace, request a token for feature ID com.microsoft.windows.ai.appcontentindexer.

Applies to