# Document.DoubleProperty

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

*** ** * ** ***


```
@Documented
@Retention(value = RetentionPolicy.CLASS)
@Target(value = [ElementType.FIELD, ElementType.METHOD])
public annotation Document.DoubleProperty
```

<br />

*** ** * ** ***

Configures a double-precision decimal number field of a class as a property known to AppSearch.

## Summary

| ### Public methods |
|---|---|
| `abstract https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/appsearch/annotation/Document.DoubleProperty#name()()` The name of this property. |
| `abstract boolean` | `https://developer.android.com/reference/androidx/appsearch/annotation/Document.DoubleProperty#required()()` Configures whether this property must be specified for the document to be valid. |

## Public methods

### name

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

```
public abstract String name()
```

The name of this property. This string is used to query against this property.

If not specified, the name of the field in the code will be used instead.

### required

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

```
public abstract boolean required()
```

Configures whether this property must be specified for the document to be valid.

This attribute does not apply to properties of a repeated type (e.g. a list).

Please make sure you understand the consequences of required fields on `https://developer.android.com/reference/androidx/appsearch/app/AppSearchSession#setSchemaAsync(androidx.appsearch.app.SetSchemaRequest)` before setting this attribute to `true`.