# AppSearchSchema.EmbeddingPropertyConfig

Artifact: [androidx.appsearch:appsearch](https://developer.android.com/jetpack/androidx/releases/appsearch) [View Source](https://cs.android.com/search?q=file:androidx/appsearch/app/AppSearchSchema.java+class:androidx.appsearch.app.AppSearchSchema.EmbeddingPropertyConfig) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

*** ** * ** ***


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

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.appsearch.app.AppSearchSchema.PropertyConfig](https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.PropertyConfig) ||
|   | ↳ | [androidx.appsearch.app.AppSearchSchema.EmbeddingPropertyConfig](https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.EmbeddingPropertyConfig) |

*** ** * ** ***

Configuration for a property of type `https://developer.android.com/reference/androidx/appsearch/app/EmbeddingVector` in a Document.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.EmbeddingPropertyConfig.Builder` Builder for `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.EmbeddingPropertyConfig`. |

| ### Constants |
|---|---|
| `static final int` | `@https://developer.android.com/reference/androidx/annotation/RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = https://developer.android.com/reference/androidx/appsearch/app/Features.SCHEMA_EMBEDDING_APPROXIMATE_NEAREST_NEIGHBOR) @https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.EmbeddingPropertyConfig#INDEXING_TYPE_APPROXIMATE_NEAREST_NEIGHBOR() = 2` Embedding vectors in this property will be indexed for Approximate Nearest Neighbor (ANN) search. |
| `static final int` | `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.EmbeddingPropertyConfig#INDEXING_TYPE_NONE() = 0` Content in this property will not be indexed. |
| `static final int` | `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.EmbeddingPropertyConfig#INDEXING_TYPE_SIMILARITY() = 1` Embedding vectors in this property will be indexed. |
| `static final int` | `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.EmbeddingPropertyConfig#QUANTIZATION_TYPE_8_BIT() = 1` Contents in this property will be quantized to 8 bits. |
| `static final int` | `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.EmbeddingPropertyConfig#QUANTIZATION_TYPE_NONE() = 0` Contents in this property will not be quantized. |

| ### Public methods |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.EmbeddingPropertyConfig#getIndexingType()()` Returns how the property is indexed. |
| `int` | `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.EmbeddingPropertyConfig#getQuantizationType()()` Returns how the embedding contents of this property should be quantized. |

### Inherited Constants

From [androidx.appsearch.app.AppSearchSchema.PropertyConfig](https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.PropertyConfig) `static final int` `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.PropertyConfig#CARDINALITY_OPTIONAL() = 2`

Zero or one value \[0,1\].
`static final int` `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.PropertyConfig#CARDINALITY_REPEATED() = 1`

Any number of items (including zero) \[0...\*\].
`static final int` `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.PropertyConfig#CARDINALITY_REQUIRED() = 3`

Exactly one value \[1\].

### Inherited methods

From [androidx.appsearch.app.AppSearchSchema.PropertyConfig](https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.PropertyConfig) `boolean` `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.PropertyConfig#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html other)` `int` `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.PropertyConfig#getCardinality()()`

Returns the cardinality of the property (whether it is optional, required or repeated).
`@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.PropertyConfig#getDescription()()`

Returns a natural language description of this property.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.PropertyConfig#getName()()`

Returns the name of this property.
`int` `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.PropertyConfig#hashCode()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.PropertyConfig#toString()()`

## Constants

### INDEXING_TYPE_APPROXIMATE_NEAREST_NEIGHBOR

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
@RequiresFeature(enforcement = "androidx.appsearch.app.Features#isFeatureSupported", name = Features.SCHEMA_EMBEDDING_APPROXIMATE_NEAREST_NEIGHBOR)
@ExperimentalAppSearchApi
public static final int INDEXING_TYPE_APPROXIMATE_NEAREST_NEIGHBOR = 2
```

Embedding vectors in this property will be indexed for Approximate Nearest Neighbor (ANN) search.

The index maintains clusters of embedding vectors to offer faster search latency than a full linear scan, but does not guarantee 100% recall. This allows tuning the trade-off between search latency and recall at search time by configuring the number of clusters to search via `https://developer.android.com/reference/androidx/appsearch/app/SearchSpec.Builder#setEmbeddingQueryProbeCount(int)`.

### INDEXING_TYPE_NONE

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
public static final int INDEXING_TYPE_NONE = 0
```

Content in this property will not be indexed.

### INDEXING_TYPE_SIMILARITY

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
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](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
@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](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
@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](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
public int getIndexingType()
```

Returns how the property is indexed.

### getQuantizationType

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

```
@ExperimentalAppSearchApi
public int getQuantizationType()
```

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

If the property isn't indexed, returns `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSchema.EmbeddingPropertyConfig#QUANTIZATION_TYPE_NONE()`.