SearchHit

com.sksamuel.elastic4s.requests.searches.SearchHit
case class SearchHit(id: String, index: String, version: Long, seqNo: Long, primaryTerm: Long, score: Float, parent: Option[String], shard: Option[String], node: Option[String], routing: Option[String], explanation: Option[Explanation], sort: Option[Seq[AnyRef]], _source: Map[String, AnyRef], fields: Map[String, AnyRef], _highlight: Option[Map[String, Seq[String]]], inner_hits: Map[String, Map[String, Any]], matchedQueries: Option[Set[String]]) extends Hit

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Hit
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def exists: Boolean

Attributes

Definition Classes
Hit
def highlight: Map[String, Seq[String]]
def highlightFragments(name: String): Seq[String]
def innerHits: Map[String, InnerHits]
def innerHitsAsMap: Map[String, Map[String, Any]]
override def sourceAsMap: Map[String, AnyRef]

Attributes

Definition Classes
Hit
override def sourceAsString: String

Attributes

Definition Classes
Hit
def storedField(fieldName: String): HitField
def storedFieldOpt(fieldName: String): Option[HitField]

Inherited methods

final def isSourceEmpty: Boolean

Attributes

Inherited from:
Hit
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def ref: DocumentRef

Attributes

Inherited from:
Hit
final def safeTo[T](implicit reader: HitReader[T]): Try[T]

Uses a HitReader typeclass to convert the returned source into type T. This method will return a Left[Throwable] if there was an error during the marshalling, otherwise it will return a Right[T]

Uses a HitReader typeclass to convert the returned source into type T. This method will return a Left[Throwable] if there was an error during the marshalling, otherwise it will return a Right[T]

Attributes

Inherited from:
Hit
final def safeToOpt[T : HitReader]: Option[Try[T]]

Attributes

Inherited from:
Hit
final def sourceAsByteBuffer: ByteBuffer

Attributes

Inherited from:
Hit
final def sourceAsBytes: Array[Byte]

Attributes

Inherited from:
Hit
final def sourceAsMutableMap: Map[String, AnyRef]

Attributes

Inherited from:
Hit
final def sourceField(name: String): AnyRef

Attributes

Inherited from:
Hit
final def sourceFieldOpt(name: String): Option[AnyRef]

Attributes

Inherited from:
Hit
final def to[T : HitReader]: T

Uses a HitReader typeclass to convert the returned source into type T. This method will throw an exception if the marshalling process fails

Uses a HitReader typeclass to convert the returned source into type T. This method will throw an exception if the marshalling process fails

Attributes

Inherited from:
Hit
final def toOpt[T : HitReader]: Option[T]

Returns a Some(t) if the hit exists. It might not exist (an empty hit) if this was returned by a Get request and the given id did not exist, in which case it will return None.

Returns a Some(t) if the hit exists. It might not exist (an empty hit) if this was returned by a Get request and the given id did not exist, in which case it will return None.

Attributes

Inherited from:
Hit