Builder
class Builder
| kotlin.Any | |
| ↳ | android.app.appsearch.SearchResult.MatchInfo.Builder |
Builder for MatchInfo objects.
Summary
| Public constructors | |
|---|---|
|
Creates a new |
|
| Public methods | |
|---|---|
| SearchResult.MatchInfo |
build()Constructs a new |
| SearchResult.MatchInfo.Builder |
setEmbeddingMatch(embeddingMatch: SearchResult.EmbeddingMatchInfo?)Sets the |
| SearchResult.MatchInfo.Builder |
setExactMatchRange(matchRange: SearchResult.MatchRange)Sets the exact |
| SearchResult.MatchInfo.Builder |
setSnippetRange(matchRange: SearchResult.MatchRange)Sets the snippet |
| SearchResult.MatchInfo.Builder |
setSubmatchRange(matchRange: SearchResult.MatchRange)Sets the submatch |
Public constructors
Builder
Builder(propertyPath: String)
Creates a new 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 |
String: A dot-delimited sequence of property names indicating which property in the document these snippets correspond to. This value cannot be null. |
Public methods
build
fun build(): SearchResult.MatchInfo
Constructs a new MatchInfo.
| Return | |
|---|---|
SearchResult.MatchInfo |
This value cannot be null. |
setEmbeddingMatch
fun setEmbeddingMatch(embeddingMatch: SearchResult.EmbeddingMatchInfo?): SearchResult.MatchInfo.Builder
Sets the EmbeddingMatchInfo corresponding to the given entry.
| Parameters | |
|---|---|
embeddingMatch |
SearchResult.EmbeddingMatchInfo?: This value may be null. |
| Return | |
|---|---|
SearchResult.MatchInfo.Builder |
This value cannot be null. |
setExactMatchRange
fun setExactMatchRange(matchRange: SearchResult.MatchRange): SearchResult.MatchInfo.Builder
Sets the exact MatchRange corresponding to the given entry.
| Parameters | |
|---|---|
matchRange |
SearchResult.MatchRange: This value cannot be null. |
| Return | |
|---|---|
SearchResult.MatchInfo.Builder |
This value cannot be null. |
setSnippetRange
fun setSnippetRange(matchRange: SearchResult.MatchRange): SearchResult.MatchInfo.Builder
Sets the snippet MatchRange corresponding to the given entry.
| Parameters | |
|---|---|
matchRange |
SearchResult.MatchRange: This value cannot be null. |
| Return | |
|---|---|
SearchResult.MatchInfo.Builder |
This value cannot be null. |
setSubmatchRange
fun setSubmatchRange(matchRange: SearchResult.MatchRange): SearchResult.MatchInfo.Builder
Sets the submatch MatchRange corresponding to the given entry.
| Parameters | |
|---|---|
matchRange |
SearchResult.MatchRange: This value cannot be null. |
| Return | |
|---|---|
SearchResult.MatchInfo.Builder |
This value cannot be null. |