Language

SearchSpec.Builder.AddProjectionPaths Method

Definition

Adds property paths for the specified type to be used for projection.

[Android.Runtime.Register("addProjectionPaths", "(Ljava/lang/String;Ljava/util/Collection;)Landroid/app/appsearch/SearchSpec$Builder;", "", ApiSince=34)]
public Android.App.AppSearch.SearchSpec.Builder AddProjectionPaths(string schema, System.Collections.Generic.ICollection<Android.App.AppSearch.PropertyPath> propertyPaths);
[<Android.Runtime.Register("addProjectionPaths", "(Ljava/lang/String;Ljava/util/Collection;)Landroid/app/appsearch/SearchSpec$Builder;", "", ApiSince=34)>]
member this.AddProjectionPaths : string * System.Collections.Generic.ICollection<Android.App.AppSearch.PropertyPath> -> Android.App.AppSearch.SearchSpec.Builder

Parameters

schema
String

a string corresponding to the schema to add projections to. This value cannot be null.

propertyPaths
ICollection<PropertyPath>

the projections to add. This value cannot be null.

Returns

Attributes

Remarks

Adds property paths for the specified type to be used for projection. If property paths are added for a type, then only the properties referred to will be retrieved for results of that type. If a property path that is specified isn't present in a result, it will be ignored for that result. Property paths cannot be null. If no property paths are added for a particular type, then all properties of results of that type will be retrieved. If property path is added for the SearchSpec.SCHEMA_TYPE_WILDCARD, then those property paths will apply to all results, excepting any types that have their own, specific property paths set. Suppose the following document is in the index. Then, suppose that a query for "important" is issued with the following projection type property paths: The above document will be returned as:

Android reference for android.app.appsearch.SearchSpec.Builder.addProjectionPaths.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to