Skip to content

Commit

Permalink
[#2374] expose sort in hit (#2973)
Browse files Browse the repository at this point in the history
Co-authored-by: Haikel magrahi <[email protected]>
Co-authored-by: Sam <[email protected]>
  • Loading branch information
3 people committed Dec 14, 2023
1 parent aaf3962 commit 67ff0c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ trait Hit {
def seqNo: Long
def primaryTerm: Long

def sort: Option[Seq[AnyRef]]

final def ref: DocumentRef = DocumentRef(index, id)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ case class GetResponse(@JsonProperty("_id") id: String,

override def exists: Boolean = found
override def score: Float = 0
override def sort: Option[Seq[AnyRef]] = None

def fields: Map[String, AnyRef] = Option(_fields).getOrElse(Map.empty)
def source: Map[String, Any] = sourceAsMap
Expand Down

0 comments on commit 67ff0c2

Please sign in to comment.