File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
server/src/internalClusterTest/java/org/opensearch/search/nested Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 30
30
*/
31
31
public class SimpleNestedExplainIT extends OpenSearchIntegTestCase {
32
32
33
+ @ Override
34
+ protected int numberOfShards () {
35
+ return 1 ;
36
+ }
37
+
33
38
/*
34
39
* Tests the explain output for multiple docs. Concurrent search with multiple slices is tested
35
40
* here as call to indexRandomForMultipleSlices is made and compared with explain output for
@@ -70,7 +75,23 @@ public void testExplainMultipleDocs() throws Exception {
70
75
.setRefreshPolicy (IMMEDIATE )
71
76
.get ();
72
77
73
- indexRandomForMultipleSlices ("test" );
78
+ client ().prepareIndex ("test" )
79
+ .setId ("2" )
80
+ .setSource (
81
+ jsonBuilder ().startObject ()
82
+ .field ("field1" , "value2" )
83
+ .startArray ("nested1" )
84
+ .startObject ()
85
+ .field ("n_field1" , "n_value2" )
86
+ .endObject ()
87
+ .startObject ()
88
+ .field ("n_field1" , "n_value2" )
89
+ .endObject ()
90
+ .endArray ()
91
+ .endObject ()
92
+ )
93
+ .setRefreshPolicy (IMMEDIATE )
94
+ .get ();
74
95
75
96
// Turn off the concurrent search setting to test search with non-concurrent search
76
97
client ().admin ()
You can’t perform that action at this time.
0 commit comments