File tree Expand file tree Collapse file tree 5 files changed +9
-7
lines changed
java-client/src/test/java/co/elastic/clients Expand file tree Collapse file tree 5 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public class LoadingJsonTest extends ModelTestCase {
49
49
private final DocTestsTransport transport = new DocTestsTransport ();
50
50
private final ElasticsearchClient client = new ElasticsearchClient (transport );
51
51
52
- private static final SearchResponse <JsonData > searchResponse = SearchResponse .searchResponseOf (b -> b
52
+ private static final SearchResponse <JsonData > searchResponse = SearchResponse .of (b -> b
53
53
.aggregations (new HashMap <>())
54
54
.took (0 )
55
55
.timedOut (false )
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ public class AggregationsTest extends ModelTestCase {
44
44
45
45
private final Logger logger = LoggerFactory .getLogger (this .getClass ());
46
46
47
- private static final SearchResponse <JsonData > searchResponse = SearchResponse .searchResponseOf (b -> b
47
+ private static final SearchResponse <JsonData > searchResponse = SearchResponse .of (b -> b
48
48
.aggregations (new HashMap <>())
49
49
.took (0 )
50
50
.timedOut (false )
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ public class SearchingTest {
44
44
45
45
private final Logger logger = LoggerFactory .getLogger (this .getClass ());
46
46
47
- private static final SearchResponse <JsonData > searchResponse = SearchResponse .searchResponseOf (b -> b
47
+ private static final SearchResponse <JsonData > searchResponse = SearchResponse .of (b -> b
48
48
.aggregations (new HashMap <>())
49
49
.took (0 )
50
50
.timedOut (false )
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public void testObjectAndArrayPath() {
69
69
70
70
JsonpMappingException e = assertThrows (JsonpMappingException .class , () -> {
71
71
// withJson() will read values of the generic parameter type as JsonData
72
- SearchResponse <JsonData > r = SearchResponse .searchResponseOf (b -> b
72
+ SearchResponse <JsonData > r = SearchResponse .of (b -> b
73
73
.withJson (new StringReader (json ))
74
74
);
75
75
});
Original file line number Diff line number Diff line change @@ -52,14 +52,16 @@ public void testRequestWithGenericValueBody() {
52
52
@ Test
53
53
public void testRequestWithValueBody () {
54
54
String json = "{" +
55
- "\" analyze.max_token_count\" : 12" +
55
+ "\" analyze\" : {" +
56
+ " \" max_token_count\" : 12" +
57
+ " }" +
56
58
"}" ;
57
59
58
60
PutIndicesSettingsRequest req = PutIndicesSettingsRequest .of (b -> b
59
61
.withJson (new StringReader (json ))
60
62
);
61
63
62
- assertEquals (12 , req .settings ().analyzeMaxTokenCount ().intValue ());
64
+ assertEquals (12 , req .settings ().analyze (). maxTokenCount ().intValue ());
63
65
}
64
66
65
67
@ Test
@@ -108,7 +110,7 @@ public void testObjectWithGenericParam() {
108
110
"}" ;
109
111
110
112
// withJson() will read values of the generic parameter type as JsonData
111
- SearchResponse <JsonData > r = SearchResponse .searchResponseOf (b -> b
113
+ SearchResponse <JsonData > r = SearchResponse .of (b -> b
112
114
.withJson (new StringReader (json ))
113
115
);
114
116
You can’t perform that action at this time.
0 commit comments