Skip to content

Commit eb692a1

Browse files
committed
Merge pull request #476 from Mpdreamz/feature/generation-for-1.0
Feature/generation for 1.0
2 parents 018ca86 + 3ee3f5e commit eb692a1

File tree

100 files changed

+1200
-1428
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1200
-1428
lines changed

src/CodeGeneration/CodeGeneration.LowLevelClient/CodeGeneration.LowLevelClient.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
<Compile Include="Domain\ApiUrlPart.cs" />
7878
<Compile Include="Domain\CsharpMethod.cs" />
7979
<Compile Include="Extensions.cs" />
80+
<Compile Include="Overrides\Descriptors\DeleteWarmerDescriptorOverrides.cs" />
8081
<Compile Include="Overrides\Descriptors\PutTemplateDescriptorOverrides.cs" />
8182
<Compile Include="Overrides\Descriptors\SearchDescriptorOverrides.cs" />
8283
<Compile Include="Program.cs" />
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
namespace CodeGeneration.LowLevelClient.Overrides.Descriptors
7+
{
8+
public class DeleteWarmerDescriptorOverrides : IDescriptorOverrides
9+
{
10+
public IEnumerable<string> SkipQueryStringParams
11+
{
12+
get
13+
{
14+
return new string[]
15+
{
16+
"name"
17+
};
18+
}
19+
}
20+
}
21+
}

src/CodeGeneration/CodeGeneration.LowLevelClient/Overrides/Descriptors/SearchDescriptorOverrides.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ public IEnumerable<string> SkipQueryStringParams
3333
"version",
3434
"q", //we dont support GET searches
3535
"fields",
36-
"sort"
36+
"sort",
37+
"_source",
38+
"_source_include",
39+
"_source_exclude"
3740
};
3841
}
3942
}

src/Nest/DSL/CountDescriptor.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,17 @@
55
namespace Nest
66
{
77
[DescriptorFor("Count")]
8-
[JsonConverter(typeof(CustomJsonConverter))]
98
public partial class CountDescriptor<T>
109
: QueryPathDescriptorBase<CountDescriptor<T>, T, CountQueryString>
11-
, IActAsQuery
1210
, IPathInfo<CountQueryString>
13-
, ICustomJson
1411
where T : class
1512
{
16-
BaseQuery IActAsQuery._Query { get; set; }
13+
[JsonProperty("query")]
14+
internal BaseQuery _Query { get; set; }
1715

1816
public CountDescriptor<T> Query(Func<QueryDescriptor<T>, BaseQuery> querySelector)
1917
{
20-
((IActAsQuery)this)._Query = querySelector(new QueryDescriptor<T>());
18+
this._Query = querySelector(new QueryDescriptor<T>());
2119
return this;
2220
}
2321

@@ -31,10 +29,5 @@ ElasticsearchPathInfo<CountQueryString> IPathInfo<CountQueryString>.ToPathInfo(I
3129

3230
return pathInfo;
3331
}
34-
35-
object ICustomJson.GetCustomJson()
36-
{
37-
return ((IActAsQuery) this)._Query;
38-
}
3932
}
4033
}

src/Nest/DSL/FluentDictionary.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq.Expressions;
4+
using Nest.Resolvers;
25

36
namespace Nest
47
{
8+
public class FluentFieldList<T> : List<PropertyPathMarker> where T : class
9+
{
10+
public new FluentFieldList<T> Add(Expression<Func<T, object>> k)
11+
{
12+
base.Add(k);
13+
return this;
14+
}
15+
public new FluentFieldList<T> Add(string k)
16+
{
17+
base.Add(k);
18+
return this;
19+
}
20+
}
521
public class FluentDictionary<K, V> : Dictionary<K, V>
622
{
723
public FluentDictionary()

src/Nest/DSL/IQueryDescriptor.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ interface IQueryDescriptor<T>
4141
BaseQuery Terms(string field, params string[] terms);
4242
BaseQuery TermsDescriptor(Action<TermsQueryDescriptor<T, object>> selector);
4343
BaseQuery TermsDescriptor<K>(Action<TermsQueryDescriptor<T, K>> selector);
44-
BaseQuery Text(Action<TextQueryDescriptor<T>> selector);
45-
BaseQuery TextPhrase(Action<TextPhraseQueryDescriptor<T>> selector);
46-
BaseQuery TextPhrasePrefix(Action<TextPhrasePrefixQueryDescriptor<T>> selector);
4744
BaseQuery Match(Action<MatchQueryDescriptor<T>> selector);
4845
BaseQuery MatchPhrase(Action<MatchPhraseQueryDescriptor<T>> selector);
4946
BaseQuery MatchPhrasePrefix(Action<MatchPhrasePrefixQueryDescriptor<T>> selector);

src/Nest/DSL/PartialFieldDescriptor.cs

Lines changed: 0 additions & 49 deletions
This file was deleted.

src/Nest/DSL/Query/RawQuery.cs

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/Nest/DSL/Query/TextPhrasePrefixQueryDescriptor.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/Nest/DSL/Query/TextPhraseQueryDescriptor.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)