We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a07cdde commit 075ed7bCopy full SHA for 075ed7b
elastic/inner_hits.sh
@@ -0,0 +1,18 @@
1
+#!/bin/bash
2
+
3
+curl -XPOST "localhost:9200/index_name/_search?pretty" \
4
+-H 'Content-Type: application/json' \
5
+-d'{
6
+ "size": 1,
7
+ "query": {
8
+ "match_all": {}
9
+ },
10
+ "collapse": {
11
+ "field": "field.keyword",
12
+ "inner_hits": {
13
+ "name": "most_recent",
14
+ "size": 10,
15
+ "sort": [{"timestamp": "desc"}]
16
+ }
17
18
+}'
0 commit comments