You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>In addition to implementing your own <code>IConnection</code>, the existing <code>HttpConnection</code> and <code>ThriftConnection</code> are extendible and can be subclassed in order to modify or extend their behavior.</p>
22
+
<p>For instance, a common use case is the ability to add client certificates to web requests. You can subclass <code>HttpConnection</code> and override the <code>CreateHttpWebRequest</code> method that creates the web request, and add certificates to it like so:</p>
23
+
<pre><code>public class SignedHttpConnection : HttpConnection
Copy file name to clipboardExpand all lines: docs/build/nest/indices/create-indices.html
+8-5
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,16 @@
4
4
<h2id="note">Note</h2>
5
5
<p>When adding settings strip the <code>index.</code> prefix. This applies to settings found in the <ahref="http://www.elasticsearch.org/guide/reference/index-modules/">Index Module</a> documentation.</p>
Copy file name to clipboardExpand all lines: docs/build/nest/indices/put-mapping.html
+9-14
Original file line number
Diff line number
Diff line change
@@ -41,39 +41,34 @@ <h2 id="attribute-based-mapping">Attribute based mapping</h2>
41
41
<p><strong>ALSO NOTE</strong>: <code>Map<T>()</code> will also explicitly map string properties as strings with elasticsearch even if they do not have an attribute on them. It does this for all the value types (string, int, float, double, DateTime).</p>
42
42
<h2id="code-based-mapping">Code based mapping</h2>
43
43
<p>You can also create mappings on the fly:</p>
44
-
<pre><code>var typeMapping = new TypeMapping(Guid.NewGuid().ToString("n"));
45
-
var property = new TypeMappingProperty
44
+
<pre><code>var indexDefinition = new RootObjectMapping
46
45
{
47
-
Type = "multi_field"
46
+
Properties = new Dictionary<PropertyNameMarker, IElasticType>(),
47
+
Name = indexName
48
48
};
49
49
50
-
var primaryField = new TypeMappingProperty
50
+
var property = new StringMapping
51
51
{
52
-
Type = "string",
53
52
Index = "not_analyzed"
54
53
};
55
54
56
-
var analyzedField = new TypeMappingProperty
55
+
var analyzedField = new StringMapping
57
56
{
58
-
Type = "string",
59
57
Index = "analyzed"
60
58
};
61
59
62
-
property.Fields = new Dictionary<string, TypeMappingProperty>();
0 commit comments