From c53c37c02be079bbf046a98c1a2e30e54d099a08 Mon Sep 17 00:00:00 2001 From: ericamick Date: Thu, 19 May 2016 13:45:46 -0400 Subject: [PATCH] Update auto-map.asciidoc --- .../high-level/mapping/auto-map.asciidoc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/client-concepts/high-level/mapping/auto-map.asciidoc b/docs/client-concepts/high-level/mapping/auto-map.asciidoc index 138694cf7e7..903e2138121 100644 --- a/docs/client-concepts/high-level/mapping/auto-map.asciidoc +++ b/docs/client-concepts/high-level/mapping/auto-map.asciidoc @@ -50,9 +50,9 @@ var descriptor = new CreateIndexDescriptor("myindex") .Map(m => m .Properties(ps => ps .String(s => s - .Name(c => c.Name) <1> + .Name(c => c.Name) <1> ) - .Object(o => o <2> + .Object(o => o <2> .Name(c => c.Employees) .Properties(eps => eps .String(s => s @@ -250,7 +250,8 @@ various options for your properties (analyzer to use, whether to enable doc_valu In that case, it's possible to use `.AutoMap()` in conjunction with explicitly mapped properties. Here we are using `.AutoMap()` to automatically map our company type, but then we're -overriding our employee property and making it a `nested` type, since by default, `.AutoMap()` will infer objects as `object`. +overriding our employee property and making it a `nested` type, since by default, +`.AutoMap()` will infer objects as `object`. [source,csharp] ---- @@ -916,7 +917,7 @@ It is also possible to apply a transformation on all or specific properties. `.AutoMap()` internally implements the https://en.wikipedia.org/wiki/Visitor_pattern[visitor pattern]. The default visitor, `NoopPropertyVisitor`, does nothing and acts as a blank canvas for you to implement your own visiting methods. -For instance, lets create a custom visitor that disables doc values for numeric and boolean types +For instance, let's create a custom visitor that disables doc values for numeric and boolean types (Not really a good idea in practice, but let's do it anyway for the sake of a clear example.) [source,csharp] @@ -926,7 +927,7 @@ public class DisableDocValuesPropertyVisitor : NoopPropertyVisitor public override void Visit( INumberProperty type, PropertyInfo propertyInfo, - ElasticsearchPropertyAttributeBase attribute) <1> + ElasticsearchPropertyAttributeBase attribute) <1> { type.DocValues = false; } @@ -934,7 +935,7 @@ public class DisableDocValuesPropertyVisitor : NoopPropertyVisitor public override void Visit( IBooleanProperty type, PropertyInfo propertyInfo, - ElasticsearchPropertyAttributeBase attribute) <2> + ElasticsearchPropertyAttributeBase attribute) <2> { type.DocValues = false; }