Skip to content

Commit 398356a

Browse files
committed
Fix #2159 Mark Field() as obsolete in favor of Path()
1 parent ee75316 commit 398356a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Nest/Search/Suggesters/ContextSuggester/ISuggestContext.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,15 @@ public abstract class SuggestContextDescriptorBase<TDescriptor, TInterface, T> :
2929
string ISuggestContext.Type => this.Type;
3030
Field ISuggestContext.Path { get; set; }
3131

32+
[Obsolete("Removed in 5.0. Use Path() instead.")]
3233
public TDescriptor Field(Field field) => Assign(a => a.Path = field);
3334

35+
[Obsolete("Removed in 5.0. Use Path() instead.")]
3436
public TDescriptor Field(Expression<Func<T, object>> objectPath) => Assign(a => a.Path = objectPath);
37+
38+
public TDescriptor Path(Field path) => Assign(a => a.Path = path);
39+
40+
public TDescriptor Path(Expression<Func<T, object>> objectPath) => Assign(a => a.Path = objectPath);
41+
3542
}
3643
}

0 commit comments

Comments
 (0)