All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sksamuel.elastic4s.requests.searches.suggestion.SuggestionResult.scala Maven / Gradle / Ivy

There is a newer version: 8.15.4
Show newest version
package com.sksamuel.elastic4s.requests.searches.suggestion

case class SuggestionResult(text: String, offset: Int, length: Int, options: Seq[Map[String, Any]]) {
  def toCompletion: CompletionSuggestionResult =
    CompletionSuggestionResult(text, offset, length, options.map(CompletionSuggestionOption))
  def toTerm: TermSuggestionResult = TermSuggestionResult(text, offset, length, options.map(TermSuggestionOption))
  def toPhrase: PhraseSuggestionResult =
    PhraseSuggestionResult(text, offset, length, options.map(PhraseSuggestionOption))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy