弹性搜索-search_after参数 [英] Elastic search - search_after parameter

查看:548
本文介绍了弹性搜索-search_after参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了此文档了解 search_after并有两个问题。

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


  1. 我很好奇 tweet#654323的来源。这是
    文档ID或字段数据之一吗?

  2. 当我添加search_after的多个参数时,是'and'
    条件还是'or'条件?

  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]

ex) "search_after": [1463538857, 5147821]


推荐答案


  1. 如该文档中所述, tweet#654323 _uid 文档的值,该值由文档的 _type _id 组成。

  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.

search_after 中,您需要的值与排序子句,这些值的排序方式必须与sort子句中的排序方式相同。在 search_after:[1463538857,5147821] 中,您似乎正在按日期字段和其他ID字段进行排序。

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.

这篇关于弹性搜索-search_after参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆