SearchResult.MatchInfo.Builder

class SearchResult.MatchInfo.Builder


Builder for MatchInfo objects.

Summary

Public constructors

Builder(propertyPath: String)

Creates a new MatchInfo.Builder reporting a match with the given property path.

Public functions

SearchResult.MatchInfo

Constructs a new MatchInfo.

SearchResult.MatchInfo.Builder

Sets the exact MatchRange corresponding to the given entry.

SearchResult.MatchInfo.Builder

Sets the snippet MatchRange corresponding to the given entry.

SearchResult.MatchInfo.Builder

Sets the submatch MatchRange corresponding to the given entry.

Public constructors

Builder

Added in 1.1.0-alpha04
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.

Public functions

build

Added in 1.1.0-alpha04
fun build(): SearchResult.MatchInfo

Constructs a new MatchInfo.

setExactMatchRange

Added in 1.1.0-alpha04
fun setExactMatchRange(matchRange: SearchResult.MatchRange): SearchResult.MatchInfo.Builder

Sets the exact MatchRange corresponding to the given entry.

setSnippetRange

Added in 1.1.0-alpha04
fun setSnippetRange(matchRange: SearchResult.MatchRange): SearchResult.MatchInfo.Builder

Sets the snippet MatchRange corresponding to the given entry.

setSubmatchRange

Added in 1.1.0-alpha04
fun setSubmatchRange(matchRange: SearchResult.MatchRange): SearchResult.MatchInfo.Builder

Sets the submatch MatchRange corresponding to the given entry.