Class NestedSortDescriptor<T>
Sort on a field inside one or more nested objects.
Inheritance
NestedSortDescriptor<T>
Assembly: OpenSearch.Client.dll
Syntax
public class NestedSortDescriptor<T> : DescriptorBase<NestedSortDescriptor<T>, INestedSort>, IDescriptor, INestedSort where T : class
Type Parameters
Methods
|
Edit this page
View Source
Filter(Func<QueryContainerDescriptor<T>, QueryContainer>)
A filter that the inner objects inside the nested path should match with in order for its field values to be taken into account
by sorting. A common pattern is to repeat the query/filter inside the nested filter or query.
By default no nested filter is active.
Declaration
public NestedSortDescriptor<T> Filter(Func<QueryContainerDescriptor<T>, QueryContainer> filterSelector)
Parameters
Returns
|
Edit this page
View Source
MaxChildren(int?)
The maximum number of children to consider per root document when picking the sort value. Defaults to unlimited.
Declaration
public NestedSortDescriptor<T> MaxChildren(int? maxChildren)
Parameters
Type |
Name |
Description |
int? |
maxChildren |
|
Returns
|
Edit this page
View Source
Nested(Func<NestedSortDescriptor<T>, INestedSort>)
Same as top-level nested, but applies to another nested path within the current nested object.
Declaration
public NestedSortDescriptor<T> Nested(Func<NestedSortDescriptor<T>, INestedSort> filterSelector)
Parameters
Returns
|
Edit this page
View Source
Path(Field)
Defines on which nested object to sort. The actual sort field must be a direct field inside this nested object.
When sorting by nested field, this field is mandatory.
Declaration
public NestedSortDescriptor<T> Path(Field path)
Parameters
Type |
Name |
Description |
Field |
path |
|
Returns
|
Edit this page
View Source
Path<TValue>(Expression<Func<T, TValue>>)
Defines on which nested object to sort. The actual sort field must be a direct field inside this nested object.
When sorting by nested field, this field is mandatory.
Declaration
public NestedSortDescriptor<T> Path<TValue>(Expression<Func<T, TValue>> objectPath)
Parameters
Returns
Type Parameters
Implements
Extension Methods