AppSearchSchema.EmbeddingPropertyConfig


@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.SCHEMA_EMBEDDING_PROPERTY_CONFIG)
public final class AppSearchSchema.EmbeddingPropertyConfig extends AppSearchSchema.PropertyConfig


Configuration for a property of type EmbeddingVector in a Document.

Summary

Nested types

Builder for EmbeddingPropertyConfig.

Constants

static final int

Content in this property will not be indexed.

static final int

Embedding vectors in this property will be indexed.

static final int

Contents in this property will be quantized to 8 bits.

static final int

Contents in this property will not be quantized.

Public methods

int

Returns how the property is indexed.

int

Returns how the embedding contents of this property should be quantized.

Inherited Constants

From androidx.appsearch.app.AppSearchSchema.PropertyConfig
static final int

Zero or one value [0,1].

static final int

Any number of items (including zero) [0...*].

static final int

Exactly one value [1].

Inherited methods

From androidx.appsearch.app.AppSearchSchema.PropertyConfig
boolean
int

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

@NonNull String

Returns a natural language description of this property.

@NonNull String

Returns the name of this property.

int
@NonNull String

Constants

INDEXING_TYPE_NONE

Added in 1.1.0-alpha07
public static final int INDEXING_TYPE_NONE = 0

Content in this property will not be indexed.

INDEXING_TYPE_SIMILARITY

Added in 1.1.0-alpha07
public static final int INDEXING_TYPE_SIMILARITY = 1

Embedding vectors in this property will be indexed.

The index offers 100% accuracy, but has linear time complexity based on the number of embedding vectors within the index.

QUANTIZATION_TYPE_8_BIT

Added in 1.1.0-alpha07
@ExperimentalAppSearchApi
public static final int QUANTIZATION_TYPE_8_BIT = 1

Contents in this property will be quantized to 8 bits.

QUANTIZATION_TYPE_NONE

Added in 1.1.0-alpha07
@ExperimentalAppSearchApi
public static final int QUANTIZATION_TYPE_NONE = 0

Contents in this property will not be quantized.

Public methods

getIndexingType

Added in 1.1.0-alpha07
public int getIndexingType()

Returns how the property is indexed.

getQuantizationType

Added in 1.1.0-alpha07
@ExperimentalAppSearchApi
public int getQuantizationType()

Returns how the embedding contents of this property should be quantized.

If the property isn't indexed, returns QUANTIZATION_TYPE_NONE.