弹性搜索-search_after参数 [英] Elastic search - search_after parameter
问题描述
我阅读了此文档了解 search_after并有两个问题。
I read this doc to understand 'search_after' and have two question.
- 我很好奇 tweet#654323的来源。这是
文档ID或字段数据之一吗? -
当我添加search_after的多个参数时,是'and'
条件还是'or'条件?
- I'm curious that where "tweet#654323" comes from. Is this one of document id or field data?
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]
推荐答案
-
如该文档中所述,
tweet#654323
是_uid
文档的值,该值由文档的_type
和_id
组成。
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屋!