Elastic search - search_after parameter

2020-06-12 03:06发布

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]

1条回答
神经病院院长
2楼-- · 2020-06-12 03:28
  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.

查看更多
登录 后发表回答