|
10 | 10 |
|
11 | 11 | namespace Elasticsearch.Net |
12 | 12 | { |
| 13 | + /// <summary> |
| 14 | + /// Low level client that exposes all of elasticsearch API endpoints but leaves you in charge of building request and handling the response |
| 15 | + /// </summary> |
13 | 16 | public partial class ElasticsearchClient : IElasticsearchClient |
14 | 17 | { |
15 | 18 | public IConnectionConfigurationValues Settings { get { return this.Transport.Settings; } } |
16 | 19 | public IElasticsearchSerializer Serializer { get { return this.Transport.Serializer; } } |
17 | 20 |
|
18 | 21 | protected IStringifier Stringifier { get; set; } |
19 | 22 | protected ITransport Transport { get; set; } |
20 | | - |
| 23 | + |
| 24 | + /// <summary> |
| 25 | + /// Instantiate a new low level elasticsearch client |
| 26 | + /// </summary> |
| 27 | + /// <param name="settings">Specify how and where the client connects to elasticsearch, defaults to a static single node connectionpool |
| 28 | + /// to http://localhost:9200 |
| 29 | + /// </param> |
| 30 | + /// <param name="connection">Provide an alternative connection handler</param> |
| 31 | + /// <param name="transport">Provide a custom transport implementation that coordinates between IConnectionPool, IConnection and ISerializer</param> |
| 32 | + /// <param name="serializer">Provide a custom serializer</param> |
| 33 | + /// <param name="stringifier">This interface is responsible for translating non string objects in the querystring to strings</param> |
21 | 34 | public ElasticsearchClient( |
22 | | - IConnectionConfigurationValues settings, |
| 35 | + IConnectionConfigurationValues settings = null, |
23 | 36 | IConnection connection = null, |
24 | 37 | ITransport transport = null, |
25 | 38 | IElasticsearchSerializer serializer = null, |
26 | 39 | IStringifier stringifier = null |
27 | 40 | ) |
28 | 41 | { |
29 | | - if (settings == null) |
30 | | - throw new ArgumentNullException("settings"); |
31 | | - |
| 42 | + settings = settings ?? new ConnectionConfiguration(); |
32 | 43 | this.Transport = transport ?? new Transport(settings, connection, serializer); |
33 | 44 | this.Stringifier = stringifier ?? new Stringifier(); |
34 | 45 |
|
|
0 commit comments