Skip to content

Commit 15cad69

Browse files
committed
fiddled a bit with the ghostdoc settings
1 parent 8520a3b commit 15cad69

File tree

6 files changed

+104
-54
lines changed

6 files changed

+104
-54
lines changed

doc/ghostdoc.gdc

122 KB
Binary file not shown.

src/Elasticsearch.sln.GhostDoc.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<GhostDoc>
2+
<SpellChecker>
3+
<IncludeExtensions>
4+
</IncludeExtensions>
5+
<IgnoreExtensions>
6+
</IgnoreExtensions>
7+
<IgnoreFiles>
8+
</IgnoreFiles>
9+
</SpellChecker>
10+
<HelpConfigurations selected="HelpFile">
11+
<HelpConfiguration name="HelpFile">
12+
<OutputPath>C:\Projects\NEST\src\Help</OutputPath>
13+
<ImageFolderPath />
14+
<HtmlFormats>
15+
<HtmlHelp>true</HtmlHelp>
16+
<MSHelpViewer>false</MSHelpViewer>
17+
<MSHelp2>false</MSHelp2>
18+
<Website>false</Website>
19+
</HtmlFormats>
20+
<IncludeScopes>
21+
<Public>true</Public>
22+
<Internal>false</Internal>
23+
<Protected>false</Protected>
24+
<Private>false</Private>
25+
<Inherited>true</Inherited>
26+
<EnableTags>false</EnableTags>
27+
<TagList />
28+
</IncludeScopes>
29+
<ResolveCrefLinks>true</ResolveCrefLinks>
30+
<HeaderText />
31+
<FooterText />
32+
<SelectedProjects />
33+
</HelpConfiguration>
34+
</HelpConfigurations>
35+
</GhostDoc>

src/Nest/ConvenienceExtensions/CountExtensions.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33

44
namespace Nest
55
{
6+
/// <summary></summary>
67
public static class CountExtensions
78
{
89
/// <summary>
9-
/// Untyped count, defaults to all indices and types
10+
/// Counts the specified client.
1011
/// </summary>
11-
/// <param name="countSelector">filter on indices and types or pass pararameters</param>
12+
/// <param name="client">The client.</param>
13+
/// <param name="countSelector">The count selector.</param>
14+
/// <returns>ICountResponse.</returns>
1215
public static ICountResponse Count(this IElasticClient client,
1316
Func<CountDescriptor<dynamic>, CountDescriptor<dynamic>> countSelector = null)
1417
{
@@ -17,9 +20,11 @@ public static ICountResponse Count(this IElasticClient client,
1720
}
1821

1922
/// <summary>
20-
/// Untyped count, defaults to all indices and types
23+
/// Counts the asynchronous.
2124
/// </summary>
22-
/// <param name="countSelector">filter on indices and types or pass pararameters</param>
25+
/// <param name="client">The client.</param>
26+
/// <param name="countSelector">The count selector.</param>
27+
/// <returns>Task{ICountResponse}.</returns>
2328
public static Task<ICountResponse> CountAsync(this IElasticClient client,
2429
Func<CountDescriptor<dynamic>, CountDescriptor<dynamic>> countSelector = null)
2530
{
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
using System;
2+
using System.Collections.Concurrent;
3+
using System.Collections.Generic;
4+
using System.Collections.ObjectModel;
5+
using System.Linq;
6+
using System.Security.Cryptography.X509Certificates;
7+
using System.Text;
8+
using System.Text.RegularExpressions;
9+
using System.Threading;
10+
using Elasticsearch.Net;
11+
using Newtonsoft.Json;
12+
using Newtonsoft.Json.Converters;
13+
using Newtonsoft.Json.Linq;
14+
15+
namespace Nest
16+
{
17+
public interface INestSerializer : IElasticsearchSerializer
18+
{
19+
IQueryResponse<TResult> DeserializeSearchResponse<T, TResult>(ElasticsearchResponse status, SearchDescriptor<T> originalSearchDescriptor)
20+
where TResult : class
21+
where T : class;
22+
23+
string SerializeBulkDescriptor(BulkDescriptor bulkDescriptor);
24+
25+
/// <summary>
26+
/// _msearch needs a specialized json format in the body
27+
/// </summary>
28+
string SerializeMultiSearch(MultiSearchDescriptor multiSearchDescriptor);
29+
30+
TemplateResponse DeserializeTemplateResponse(ElasticsearchResponse c, GetTemplateDescriptor d);
31+
GetMappingResponse DeserializeGetMappingResponse(ElasticsearchResponse c);
32+
MultiGetResponse DeserializeMultiGetResponse(ElasticsearchResponse c, MultiGetDescriptor d);
33+
MultiSearchResponse DeserializeMultiSearchResponse(ElasticsearchResponse c, MultiSearchDescriptor d);
34+
WarmerResponse DeserializeWarmerResponse(ElasticsearchResponse connectionStatus, GetWarmerDescriptor getWarmerDescriptor);
35+
36+
/// <summary>
37+
/// Returns a response of type R based on the connection status by trying parsing status.Result into R
38+
/// </summary>
39+
R ToParsedResponse<R>(
40+
ElasticsearchResponse status,
41+
bool notFoundIsAValidResponse = false,
42+
JsonConverter piggyBackJsonConverter = null
43+
) where R : BaseResponse;
44+
}
45+
}

src/Nest/ExposedInternals/ElasticSerializer.cs renamed to src/Nest/ExposedInternals/NestSerializer.cs

Lines changed: 13 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,14 @@
1-
using System;
2-
using System.Collections.Concurrent;
1+
using System;
32
using System.Collections.Generic;
4-
using System.Collections.ObjectModel;
53
using System.Linq;
6-
using System.Security.Cryptography.X509Certificates;
74
using System.Text;
8-
using System.Text.RegularExpressions;
9-
using System.Threading;
105
using Elasticsearch.Net;
116
using Nest.Resolvers;
127
using Nest.Resolvers.Converters;
138
using Newtonsoft.Json;
14-
using Newtonsoft.Json.Converters;
15-
using Newtonsoft.Json.Linq;
169

1710
namespace Nest
1811
{
19-
public interface INestSerializer : IElasticsearchSerializer
20-
{
21-
IQueryResponse<TResult> DeserializeSearchResponse<T, TResult>(ElasticsearchResponse status, SearchDescriptor<T> originalSearchDescriptor)
22-
where TResult : class
23-
where T : class;
24-
25-
string SerializeBulkDescriptor(BulkDescriptor bulkDescriptor);
26-
27-
/// <summary>
28-
/// _msearch needs a specialized json format in the body
29-
/// </summary>
30-
string SerializeMultiSearch(MultiSearchDescriptor multiSearchDescriptor);
31-
32-
TemplateResponse DeserializeTemplateResponse(ElasticsearchResponse c, GetTemplateDescriptor d);
33-
GetMappingResponse DeserializeGetMappingResponse(ElasticsearchResponse c);
34-
MultiGetResponse DeserializeMultiGetResponse(ElasticsearchResponse c, MultiGetDescriptor d);
35-
MultiSearchResponse DeserializeMultiSearchResponse(ElasticsearchResponse c, MultiSearchDescriptor d);
36-
WarmerResponse DeserializeWarmerResponse(ElasticsearchResponse connectionStatus, GetWarmerDescriptor getWarmerDescriptor);
37-
38-
/// <summary>
39-
/// Returns a response of type R based on the connection status by trying parsing status.Result into R
40-
/// </summary>
41-
R ToParsedResponse<R>(
42-
ElasticsearchResponse status,
43-
bool notFoundIsAValidResponse = false,
44-
JsonConverter piggyBackJsonConverter = null
45-
) where R : BaseResponse;
46-
}
47-
4812
public class NestSerializer : INestSerializer
4913
{
5014
private readonly IConnectionSettingsValues _settings;
@@ -72,9 +36,9 @@ public virtual R ToParsedResponse<R>(
7236

7337
var isValid =
7438
(notFoundIsAValidResponse)
75-
? (status.Error == null
76-
|| status.Error.HttpStatusCode == System.Net.HttpStatusCode.NotFound)
77-
: (status.Error == null);
39+
? (status.Error == null
40+
|| status.Error.HttpStatusCode == System.Net.HttpStatusCode.NotFound)
41+
: (status.Error == null);
7842

7943
R r;
8044
if (!isValid)
@@ -162,11 +126,11 @@ public string SerializeBulkDescriptor(BulkDescriptor bulkDescriptor)
162126
{
163127
var command = operation._Operation;
164128
var index = operation._Index
165-
?? inferrer.IndexName(bulkDescriptor._Index)
166-
?? inferrer.IndexName(operation._ClrType);
129+
?? inferrer.IndexName(bulkDescriptor._Index)
130+
?? inferrer.IndexName(operation._ClrType);
167131
var typeName = operation._Type
168-
?? inferrer.TypeName(bulkDescriptor._Type)
169-
?? inferrer.TypeName(operation._ClrType);
132+
?? inferrer.TypeName(bulkDescriptor._Type)
133+
?? inferrer.TypeName(operation._ClrType);
170134

171135
var id = operation.GetIdForObject(inferrer);
172136
operation._Index = index;
@@ -207,13 +171,13 @@ public string SerializeMultiSearch(MultiSearchDescriptor multiSearchDescriptor)
207171
indices = "_all";
208172

209173
var index = indices
210-
?? inferrer.IndexName(multiSearchDescriptor._Index)
211-
?? inferrer.IndexName(operation._ClrType);
174+
?? inferrer.IndexName(multiSearchDescriptor._Index)
175+
?? inferrer.IndexName(operation._ClrType);
212176

213177
var types = inferrer.TypeNames(operation._Types);
214178
var typeName = types
215-
?? inferrer.TypeName(multiSearchDescriptor._Type)
216-
?? inferrer.TypeName(operation._ClrType);
179+
?? inferrer.TypeName(multiSearchDescriptor._Type)
180+
?? inferrer.TypeName(operation._ClrType);
217181
if (operation._AllTypes.GetValueOrDefault(false))
218182
typeName = null; //force empty typename so we'll query all types.
219183

@@ -331,4 +295,4 @@ protected string GetSearchType(SearchDescriptorBase descriptor, MultiSearchDescr
331295
}
332296

333297
}
334-
}
298+
}

src/Nest/Nest.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@
170170
<Compile Include="DSL\_Descriptors.generated.cs" />
171171
<Compile Include="Exception\DispatchException.cs" />
172172
<Compile Include="ExposedInternals\JsonConverterPiggyBackState.cs" />
173+
<Compile Include="ExposedInternals\NestSerializer.cs" />
173174
<Compile Include="ExposedInternals\Stringifier.cs" />
174175
<Compile Include="Extensions\SuffixExtensions.cs" />
175176
<Compile Include="RawDispatch.generated.cs" />
@@ -199,7 +200,7 @@
199200
<Compile Include="DSL\Suggest\CompletionSuggestDescriptor.cs" />
200201
<Compile Include="DSL\Query\FunctionScoreQueryDescriptor.cs" />
201202
<Compile Include="ExposedInternals\ElasticInferrer.cs" />
202-
<Compile Include="ExposedInternals\ElasticSerializer.cs" />
203+
<Compile Include="ExposedInternals\INestSerializer.cs" />
203204
<Compile Include="Domain\Responses\IReindexResponse.cs" />
204205
<Compile Include="Domain\Suggest\Suggest.cs" />
205206
<Compile Include="Domain\Suggest\SuggestOption.cs" />

0 commit comments

Comments
 (0)