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 setIndexingType(int indexingType)

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

AppSearchSchema.EmbeddingPropertyConfig.Builder setQuantizationType(int quantizationType)

Configures whether the vector contents of this property should be quantized.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

Added in T Extensions 16
public Builder (String propertyName)

Creates a new EmbeddingPropertyConfig.Builder.

Parameters
propertyName String: This value cannot be null.

Public methods

build

Added in T Extensions 16
public AppSearchSchema.EmbeddingPropertyConfig build ()

Constructs a new EmbeddingPropertyConfig from the contents of this builder.

Returns
AppSearchSchema.EmbeddingPropertyConfig This value cannot be null.

setCardinality

Added in T Extensions 16
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.

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

setIndexingType

Added in T Extensions 16
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.

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

setQuantizationType

public AppSearchSchema.EmbeddingPropertyConfig.Builder setQuantizationType (int quantizationType)

Configures whether the vector contents of this property should be quantized.

Quantization can reduce the size of the embedding search index, potentially leading to faster embedding search due to lower I/O bandwidth. Quantization is usually very reliable and in most cases will have a negligible impact on recall. Using quantization is strongly recommended.

If this method is not called, the default quantization type is AppSearchSchema.EmbeddingPropertyConfig.QUANTIZATION_TYPE_NONE.

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