Skip to content

Commit 2775a65

Browse files
russcamgithub-actions[bot]
authored andcommitted
Update custom serialization docs (#4580)
This commit updates the custom serialization docs that discuss using JsonNetSerializer. 1. Remove the implication that the internal serializer is based on Json.NET. 2. Include recommendation to hook up JsonNetSerializer when using Newtonsoft.Json.Linq types like JObject
1 parent 8c36aac commit 2775a65

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

docs/client-concepts/high-level/serialization/custom-serialization.asciidoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ back to NEST's built-in serializer.
115115

116116
We ship a separate {nuget}/NEST.JsonNetSerializer[NEST.JsonNetSerializer] package that helps in composing a custom `SourceSerializer`
117117
using `Json.NET`, that is smart enough to delegate the serialization of known NEST types back to the built-in
118-
`RequestResponseSerializer`. This package is also useful if you want to control how your documents and values are stored
119-
and retrieved from Elasticsearch using `Json.NET`, without interfering with the way NEST uses `Json.NET` internally.
118+
`RequestResponseSerializer`. This package is also useful if
119+
120+
. You want to control how your documents and values are stored and retrieved from Elasticsearch using `Json.NET`
121+
122+
. You want to use `Newtonsoft.Json.Linq` types such as `JObject` within your documents
120123

121124
The easiest way to hook this custom source serializer up is as follows
122125

docs/query-dsl.asciidoc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ NEST exposes all of the full text queries available in Elasticsearch
4949

5050
* <<intervals-usage,Intervals Usage>>
5151

52-
* <<match-bool-prefix-usage,Match Bool Prefix Usage>>
52+
* <<match-usage,Match Usage>>
5353

54-
* <<match-phrase-prefix-usage,Match Phrase Prefix Usage>>
54+
* <<match-bool-prefix-usage,Match Bool Prefix Usage>>
5555

5656
* <<match-phrase-usage,Match Phrase Usage>>
5757

58-
* <<match-usage,Match Usage>>
58+
* <<match-phrase-prefix-usage,Match Phrase Prefix Usage>>
5959

6060
* <<multi-match-usage,Multi Match Usage>>
6161

@@ -71,13 +71,13 @@ include::query-dsl/full-text/common-terms/common-terms-usage.asciidoc[]
7171

7272
include::query-dsl/full-text/intervals/intervals-usage.asciidoc[]
7373

74-
include::query-dsl/full-text/match-bool-prefix/match-bool-prefix-usage.asciidoc[]
74+
include::query-dsl/full-text/match/match-usage.asciidoc[]
7575

76-
include::query-dsl/full-text/match-phrase-prefix/match-phrase-prefix-usage.asciidoc[]
76+
include::query-dsl/full-text/match-bool-prefix/match-bool-prefix-usage.asciidoc[]
7777

7878
include::query-dsl/full-text/match-phrase/match-phrase-usage.asciidoc[]
7979

80-
include::query-dsl/full-text/match/match-usage.asciidoc[]
80+
include::query-dsl/full-text/match-phrase-prefix/match-phrase-prefix-usage.asciidoc[]
8181

8282
include::query-dsl/full-text/multi-match/multi-match-usage.asciidoc[]
8383

@@ -122,14 +122,14 @@ NEST exposes all of the term queries available in Elasticsearch
122122

123123
* <<term-query-usage,Term Query Usage>>
124124

125-
* <<terms-set-query-usage,Terms Set Query Usage>>
126-
127125
* <<terms-list-query-usage,Terms List Query Usage>>
128126

129127
* <<terms-lookup-query-usage,Terms Lookup Query Usage>>
130128

131129
* <<terms-query-usage,Terms Query Usage>>
132130

131+
* <<terms-set-query-usage,Terms Set Query Usage>>
132+
133133
* <<wildcard-query-usage,Wildcard Query Usage>>
134134

135135
See the Elasticsearch documentation on {ref_current}/term-level-queries.html[Term level queries] for more details.
@@ -160,14 +160,14 @@ include::query-dsl/term-level/regexp/regexp-query-usage.asciidoc[]
160160

161161
include::query-dsl/term-level/term/term-query-usage.asciidoc[]
162162

163-
include::query-dsl/term-level/terms-set/terms-set-query-usage.asciidoc[]
164-
165163
include::query-dsl/term-level/terms/terms-list-query-usage.asciidoc[]
166164

167165
include::query-dsl/term-level/terms/terms-lookup-query-usage.asciidoc[]
168166

169167
include::query-dsl/term-level/terms/terms-query-usage.asciidoc[]
170168

169+
include::query-dsl/term-level/terms-set/terms-set-query-usage.asciidoc[]
170+
171171
include::query-dsl/term-level/wildcard/wildcard-query-usage.asciidoc[]
172172

173173
[[compound-queries]]
@@ -283,10 +283,10 @@ Specialized types of queries that do not fit into other groups
283283

284284
* <<rank-feature-query-usage,Rank Feature Query Usage>>
285285

286-
* <<script-score-query-usage,Script Score Query Usage>>
287-
288286
* <<script-query-usage,Script Query Usage>>
289287

288+
* <<script-score-query-usage,Script Score Query Usage>>
289+
290290
* <<shape-query-usage,Shape Query Usage>>
291291

292292
See the Elasticsearch documentation on {ref_current}/specialized-queries.html[Specialized queries] for more details.
@@ -305,10 +305,10 @@ include::query-dsl/specialized/pinned/pinned-query-usage.asciidoc[]
305305

306306
include::query-dsl/specialized/rank-feature/rank-feature-query-usage.asciidoc[]
307307

308-
include::query-dsl/specialized/script-score/script-score-query-usage.asciidoc[]
309-
310308
include::query-dsl/specialized/script/script-query-usage.asciidoc[]
311309

310+
include::query-dsl/specialized/script-score/script-score-query-usage.asciidoc[]
311+
312312
include::query-dsl/specialized/shape/shape-query-usage.asciidoc[]
313313

314314
[[span-queries]]

tests/Tests/ClientConcepts/HighLevel/Serialization/CustomSerialization.doc.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,10 @@ public class MyPercolationDocument
120120
*
121121
* We ship a separate {nuget}/NEST.JsonNetSerializer[NEST.JsonNetSerializer] package that helps in composing a custom `SourceSerializer`
122122
* using `Json.NET`, that is smart enough to delegate the serialization of known NEST types back to the built-in
123-
* `RequestResponseSerializer`. This package is also useful if you want to control how your documents and values are stored
124-
* and retrieved from Elasticsearch using `Json.NET`, without interfering with the way NEST uses `Json.NET` internally.
123+
* `RequestResponseSerializer`. This package is also useful if
124+
*
125+
* . You want to control how your documents and values are stored and retrieved from Elasticsearch using `Json.NET`
126+
* . You want to use `Newtonsoft.Json.Linq` types such as `JObject` within your documents
125127
*
126128
* The easiest way to hook this custom source serializer up is as follows
127129
*/

0 commit comments

Comments
 (0)