# SearchResult.MatchInfo.Builder

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

*** ** * ** ***


```
class SearchResult.MatchInfo.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo` objects.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo.Builder#Builder(java.lang.String)(propertyPath: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Creates a new `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo.Builder` reporting a match with the given property path. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo.Builder#build()()` Constructs a new `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo`. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo.Builder` | `@https://developer.android.com/reference/kotlin/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo.Builder#setEmbeddingMatch(androidx.appsearch.app.SearchResult.EmbeddingMatchInfo)(embeddingMatch: https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.EmbeddingMatchInfo?)` Sets the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.EmbeddingMatchInfo` corresponding to the given entry. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo.Builder` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo.Builder#setExactMatchRange(androidx.appsearch.app.SearchResult.MatchRange)(matchRange: https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange)` Sets the exact `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange` corresponding to the given entry. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo.Builder` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo.Builder#setSnippetRange(androidx.appsearch.app.SearchResult.MatchRange)(matchRange: https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange)` Sets the snippet `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange` corresponding to the given entry. |
| `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo.Builder` | `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo.Builder#setSubmatchRange(androidx.appsearch.app.SearchResult.MatchRange)(matchRange: https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange)` Sets the submatch `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange` corresponding to the given entry. |

## Public constructors

### Builder

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

```
Builder(propertyPath: String)
```

Creates a new `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo.Builder` reporting a match with the given property path.

A property path is a dot-delimited sequence of property names indicating which property in the document these snippets correspond to.

Example properties: 'body', 'sender.name', 'sender.emailaddress', etc. For class example 1, this returns "subject".

| Parameters |
|---|---|
| `propertyPath: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | A dot-delimited sequence of property names indicating which property in the document these snippets correspond to. |

## Public functions

### build

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

```
fun build(): SearchResult.MatchInfo
```

Constructs a new `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchInfo`.

### setEmbeddingMatch

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

```
@ExperimentalAppSearchApi
fun setEmbeddingMatch(embeddingMatch: SearchResult.EmbeddingMatchInfo?): SearchResult.MatchInfo.Builder
```

Sets the `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.EmbeddingMatchInfo` corresponding to the given entry.

### setExactMatchRange

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

```
fun setExactMatchRange(matchRange: SearchResult.MatchRange): SearchResult.MatchInfo.Builder
```

Sets the exact `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange` corresponding to the given entry.

### setSnippetRange

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

```
fun setSnippetRange(matchRange: SearchResult.MatchRange): SearchResult.MatchInfo.Builder
```

Sets the snippet `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange` corresponding to the given entry.

### setSubmatchRange

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

```
fun setSubmatchRange(matchRange: SearchResult.MatchRange): SearchResult.MatchInfo.Builder
```

Sets the submatch `https://developer.android.com/reference/kotlin/androidx/appsearch/app/SearchResult.MatchRange` corresponding to the given entry.