语言

AppSearchSchema.DocumentPropertyConfig.Builder.AddIndexableNestedProperties 方法

定义

重载

名称 说明
AddIndexableNestedProperties(ICollection<String>)

添加一个或多个用于从嵌套文档编制索引的属性。

AddIndexableNestedProperties(String[])

添加一个或多个用于从嵌套文档属性编制索引的属性。

AddIndexableNestedProperties(ICollection<String>)

添加一个或多个用于从嵌套文档编制索引的属性。

[Android.Runtime.Register("addIndexableNestedProperties", "(Ljava/util/Collection;)Landroid/app/appsearch/AppSearchSchema$DocumentPropertyConfig$Builder;", "", ApiSince=35)]
public Android.App.AppSearch.AppSearchSchema.DocumentPropertyConfig.Builder AddIndexableNestedProperties(System.Collections.Generic.ICollection<string> indexableNestedProperties);
[<Android.Runtime.Register("addIndexableNestedProperties", "(Ljava/util/Collection;)Landroid/app/appsearch/AppSearchSchema$DocumentPropertyConfig$Builder;", "", ApiSince=35)>]
member this.AddIndexableNestedProperties : System.Collections.Generic.ICollection<string> -> Android.App.AppSearch.AppSearchSchema.DocumentPropertyConfig.Builder

参数

indexableNestedProperties
ICollection<String>

要添加到此属性的索引配置的嵌套属性路径。

返回

此生成器实例。

特性

注解

添加一个或多个用于从嵌套文档编制索引的属性。 添加的属性将根据文档架构定义中的该属性的索引配置编制索引。 此列表中的所有属性都将使用 sectionId,而不考虑其实际索引配置 -- 这包括添加的属性(实际上不存在),以及未在嵌套架构类型中设置为可索引的属性。 输入字符串应遵循嵌套属性的属性路径的格式,“.”作为路径分隔符。 该嵌套文档的属性名称不应包含在属性路径中。 例如: 请考虑定义嵌套文档属性“address”(地址架构类型)的“组织”架构类型,其中地址具有嵌套文档属性“country”(具有字符串“name”属性的国家/地区架构类型)和字符串“street”属性。 可以通过调用“地址”文档属性为“组织”架构类型编制“街道”和“国家/地区名称”属性的索引:

OrganizationSchema.addProperty(
                new DocumentPropertyConfig.Builder("address", "Address")
                        .addIndexableNestedProperties("street", "country.name")
                        .build()).

如果为文档属性添加了任何可索引嵌套属性,则 DocumentPropertyConfig.Builder.setShouldIndexNestedProperties 必须为 false。 如果不是真的,则尝试生成 DocumentPropertyConfig 会引发 IllegalArgumentException。

Android 参考。android.app.appsearch.AppSearchSchema.DocumentPropertyConfig.Builder.addIndexableNestedProperties

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

AddIndexableNestedProperties(String[])

添加一个或多个用于从嵌套文档属性编制索引的属性。

[Android.Runtime.Register("addIndexableNestedProperties", "([Ljava/lang/String;)Landroid/app/appsearch/AppSearchSchema$DocumentPropertyConfig$Builder;", "", ApiSince=35)]
public Android.App.AppSearch.AppSearchSchema.DocumentPropertyConfig.Builder AddIndexableNestedProperties(params string[] indexableNestedProperties);
[<Android.Runtime.Register("addIndexableNestedProperties", "([Ljava/lang/String;)Landroid/app/appsearch/AppSearchSchema$DocumentPropertyConfig$Builder;", "", ApiSince=35)>]
member this.AddIndexableNestedProperties : string[] -> Android.App.AppSearch.AppSearchSchema.DocumentPropertyConfig.Builder

参数

indexableNestedProperties
String[]

要添加到此属性的索引配置的嵌套属性路径。

返回

此生成器实例。

特性

注解

添加一个或多个用于从嵌套文档属性编制索引的属性。

Android 参考。android.app.appsearch.AppSearchSchema.DocumentPropertyConfig.Builder.addIndexableNestedProperties

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于