AppSearchSchema.EmbeddingPropertyConfig.Builder


public static final class AppSearchSchema.EmbeddingPropertyConfig.Builder
extends Object

java.lang.Object
   ↳ android.app.appsearch.AppSearchSchema.EmbeddingPropertyConfig.Builder


Builder for EmbeddingPropertyConfig.

Summary

Public constructors

Builder(String propertyName)

Creates a new EmbeddingPropertyConfig.Builder.

Public methods

AppSearchSchema.EmbeddingPropertyConfig build()

Constructs a new EmbeddingPropertyConfig from the contents of this builder.

AppSearchSchema.EmbeddingPropertyConfig.Builder setCardinality(int cardinality)

Sets the cardinality of the property (whether it is optional, required or repeated).

AppSearchSchema.EmbeddingPropertyConfig.Builder setDescription(String description)

Sets a natural language description of this property.

AppSearchSchema.EmbeddingPropertyConfig.Builder setIndexingType(int indexingType)

Configures how a property should be indexed so that it can be retrieved by queries.

Inherited methods

Public constructors

Builder

public Builder (String propertyName)

Creates a new EmbeddingPropertyConfig.Builder.

Parameters
propertyName String: This value cannot be null.

Public methods

build

public AppSearchSchema.EmbeddingPropertyConfig build ()

Constructs a new EmbeddingPropertyConfig from the contents of this builder.

Returns
AppSearchSchema.EmbeddingPropertyConfig This value cannot be null.

setCardinality

public AppSearchSchema.EmbeddingPropertyConfig.Builder setCardinality (int cardinality)

Sets the cardinality of the property (whether it is optional, required or repeated).

If this method is not called, the default cardinality is AppSearchSchema.PropertyConfig.CARDINALITY_OPTIONAL.

Parameters
cardinality int: Value is AppSearchSchema.PropertyConfig.CARDINALITY_REPEATED, AppSearchSchema.PropertyConfig.CARDINALITY_OPTIONAL, or AppSearchSchema.PropertyConfig.CARDINALITY_REQUIRED

Returns
AppSearchSchema.EmbeddingPropertyConfig.Builder This value cannot be null.

setDescription

public AppSearchSchema.EmbeddingPropertyConfig.Builder setDescription (String description)

Sets a natural language description of this property.

For more details about the description field, see AppSearchSchema.PropertyConfig.getDescription().

Parameters
description String: This value cannot be null.

Returns
AppSearchSchema.EmbeddingPropertyConfig.Builder This value cannot be null.

setIndexingType

public AppSearchSchema.EmbeddingPropertyConfig.Builder setIndexingType (int indexingType)

Configures how a property should be indexed so that it can be retrieved by queries.

If this method is not called, the default indexing type is AppSearchSchema.EmbeddingPropertyConfig.INDEXING_TYPE_NONE, so that it will not be indexed and cannot be matched by queries.

Parameters
indexingType int: Value is AppSearchSchema.EmbeddingPropertyConfig.INDEXING_TYPE_NONE, or AppSearchSchema.EmbeddingPropertyConfig.INDEXING_TYPE_SIMILARITY

Returns
AppSearchSchema.EmbeddingPropertyConfig.Builder This value cannot be null.