Skip to content

Commit 76bc611

Browse files
doggy8088russcam
andcommitted
Update getting-started.asciidoc (#4730)
This commit updates the low level client search example in the getting started docs. Co-authored-by: Russ Cam <[email protected]> (cherry picked from commit e26de7b)
1 parent 720dd61 commit 76bc611

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

docs/client-concepts/low-level/getting-started.asciidoc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,10 @@ var searchResponse = lowlevelClient.Search<StringResponse>("people", PostData.Se
176176
{
177177
match = new
178178
{
179-
field = "firstName",
180-
query = "Martijn"
179+
firstName = new
180+
{
181+
query = "Martijn"
182+
}
181183
}
182184
}
183185
}));
@@ -200,8 +202,9 @@ var searchResponse = lowlevelClient.Search<BytesResponse>("people", @"
200202
""size"": 10,
201203
""query"": {
202204
""match"": {
203-
""field"": ""firstName"",
204-
""query"": ""Martijn""
205+
""firstName"": {
206+
""query"": ""Martijn""
207+
}
205208
}
206209
}
207210
}");
@@ -273,4 +276,3 @@ var settings = new ConnectionConfiguration(new Uri("http://example.com:9200"))
273276
274277
var lowlevelClient = new ElasticLowLevelClient(settings);
275278
----
276-

tests/Tests/ClientConcepts/LowLevel/GettingStarted.doc.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,10 @@ public void SearchingWithAnonymousTypes()
192192
{
193193
match = new
194194
{
195-
field = "firstName",
196-
query = "Martijn"
195+
firstName = new
196+
{
197+
query = "Martijn"
198+
}
197199
}
198200
}
199201
}));
@@ -217,8 +219,9 @@ public void SearchingWithStrings()
217219
""size"": 10,
218220
""query"": {
219221
""match"": {
220-
""field"": ""firstName"",
221-
""query"": ""Martijn""
222+
""firstName"": {
223+
""query"": ""Martijn""
224+
}
222225
}
223226
}
224227
}");

0 commit comments

Comments
 (0)