J.Done
J.Done

Reputation: 3053

Elastic search - search_after parameter

I read this doc to understand 'search_after' and have two question.

  1. I'm curious that where "tweet#654323" comes from. Is this one of document id or field data?
  2. When I added multiple parameter of search_after, Is that 'and' condition or 'or' condition?

    ex) "search_after": [1463538857, 5147821]

Upvotes: 15

Views: 14681

Answers (1)

Val
Val

Reputation: 217314

  1. As mentioned in that doc, "tweet#654323" is the _uid value of the document, which is made up of the _type and the _id of the document.

  2. You need as many values in search_after as you have sort clauses and those values must be ordered the same way as in your sort clause. In "search_after": [1463538857, 5147821], it looks like you're sorting by a date field and some other id field.

Upvotes: 21

Related Questions