Skip to content

Commit 1297d95

Browse files
committed
Merge branch 'master' of github.com:Mpdreamz/NEST into feature/aggregations
2 parents ca3578e + 298b4ed commit 1297d95

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

src/Nest/DSL/Suggest/CompletionSuggestDescriptor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ public class CompletionSuggestDescriptor<T> : BaseSuggestDescriptor<T> where T :
1414
[JsonProperty(PropertyName = "fuzzy")]
1515
internal FuzzySuggestDescriptor<T> _Fuzzy { get; set; }
1616

17+
public CompletionSuggestDescriptor<T> Size(int size)
18+
{
19+
this._Size = size;
20+
return this;
21+
}
22+
1723
public CompletionSuggestDescriptor<T> Text(string text)
1824
{
1925
this._Text = text;

src/Nest/Enums/FieldType.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ public enum FieldType
6262
/// Completion type.
6363
/// </summary>
6464
completion,
65+
/// <summary>
66+
/// Nested type.
67+
/// </summary>
68+
nested,
6569
/// <summary>
6670
/// object type, no need to set this manually if its not a value type this will be set.
6771
/// Only set this if you need to force a value type to be mapped to an elasticsearch object type.

src/Nest/Resolvers/Writers/TypeMappingWriter.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ internal void WriteProperties(JsonWriter jsonWriter)
149149
}
150150
if (att != null)
151151
this.WritePropertiesFromAttribute(jsonWriter, att, propertyName, type);
152-
if (type == "object")
152+
if (type == "object" || type == "nested")
153153
{
154154

155155
var deepType = p.PropertyType;
@@ -228,9 +228,10 @@ private string GetElasticSearchTypeFromFieldType(FieldType? fieldType)
228228
return "date";
229229
case FieldType.boolean_type:
230230
return "boolean";
231-
232231
case FieldType.completion:
233232
return "completion";
233+
case FieldType.nested:
234+
return "nested";
234235
case FieldType.@object:
235236
return "object";
236237
default:

0 commit comments

Comments
 (0)