Skip to main content

DataQueryOperation

Namespace: Meshmakers.Octo.Runtime.Contracts.Repositories.Query

Represents a data query operation.

public record DataQueryOperation : FieldFilterCriteria, IEquatable<FieldFilterCriteria>, IEquatable<DataQueryOperation>

Inheritance ObjectFieldFilterCriteriaDataQueryOperation
Implements IEquatable<FieldFilterCriteria>, IEquatable<DataQueryOperation>

Properties

Language

The language to use for text search. This text has to be the two-letter ISO language name.

public string Language { get; private set; }

Property Value

String

TextSearchFilter

Represents full text search function for configured attributes (dependent of data source type)

public TextSearchFilter TextSearchFilter { get; private set; }

Property Value

TextSearchFilter

AttributeSearchFilter

Represents text search function for specific attributes.

public AttributeSearchFilter AttributeSearchFilter { get; private set; }

Property Value

AttributeSearchFilter

FieldAggregation

Represents aggregation input for grouping by specific attributes.

public FieldAggregationInput FieldAggregation { get; private set; }

Property Value

FieldAggregationInput

ResultAggregation

Represents aggregation input for the result.

public AggregationInput ResultAggregation { get; private set; }

Property Value

AggregationInput

SortOrders

Represents sort order for specific attributes.

public ICollection<SortOrderItem> SortOrders { get; private set; }

Property Value

ICollection<SortOrderItem>

GeospatialFilters

Represents geospatial filter for specific attributes.

public ICollection<GeospatialFilter> GeospatialFilters { get; internal set; }

Property Value

ICollection<GeospatialFilter>

Operator

Gets the logical operator for combining field filters

public LogicalOperator Operator { get; }

Property Value

LogicalOperator

FieldFilters

Represents field filters for specific attributes with different comparison operators.

public ICollection<FieldFilter> FieldFilters { get; }

Property Value

ICollection<FieldFilter>

NestedFilters

Gets the list of nested filters for complex logical operations

public List<FieldFilterCriteria> NestedFilters { get; }

Property Value

List<FieldFilterCriteria>

Methods

Create(LogicalOperator, String)

Creates a new instance of DataQueryOperation.

public static DataQueryOperation Create(LogicalOperator logicalOperator, string language)

Parameters

logicalOperator LogicalOperator
The logical operator to use for combining field filters

language String
The language to use for text search. This text has to be the two-letter ISO language name.

Returns

DataQueryOperation

UseLanguage(String)

Uses the given language for text search.

public DataQueryOperation UseLanguage(string language)

Parameters

language String
The language to use for text search. This text has to be the two letter ISO language name.

Returns

DataQueryOperation

SortOrder(String, SortOrders)

Adds a sort order to the query.

public DataQueryOperation SortOrder(string attributePath, SortOrders sortOrder)

Parameters

attributePath String
Path of attribute to sort

sortOrder SortOrders
Sort order

Returns

DataQueryOperation

TextSearch(Object)

Sets the text search filter.

public DataQueryOperation TextSearch(object searchTerm)

Parameters

searchTerm Object
Search term for full text search.

Returns

DataQueryOperation

AttributeSearch(IEnumerable<String>, Object)

Sets the attribute search filter.

public DataQueryOperation AttributeSearch(IEnumerable<string> attributePaths, object searchTerm)

Parameters

attributePaths IEnumerable<String>
List of attribute paths for full text search

searchTerm Object
Search term for full text search.

Returns

DataQueryOperation

AggregateFieldGroupBy(String[])

Groups by the given attribute paths.

public FieldAggregationInput AggregateFieldGroupBy(String[] attributePaths)

Parameters

attributePaths String[]
Attribute paths to group by.

Returns

FieldAggregationInput

AggregateResult()

Aggregates the result

public AggregationInput AggregateResult()

Returns

AggregationInput

NearGeospatialFilter(String, Point, Nullable<Double>, Nullable<Double>)

Adds a field filter to the query.

public DataQueryOperation NearGeospatialFilter(string attributeName, Point point, Nullable<double> minDistance, Nullable<double> maxDistance)

Parameters

attributeName String
Name of attribute

point Point
Point to search for

minDistance Nullable<Double>
The minimum distance from the center point that the documents can be.

maxDistance Nullable<Double>
The maximum distance from the center point that the documents can be.

Returns

DataQueryOperation