Class Query<T>
Assembly: OpenSearch.Client.dll
Syntax
public static class Query<T> where T : class
Type Parameters
Methods
|
Edit this page
View Source
Bool(Func<BoolQueryDescriptor<T>, IBoolQuery>)
Declaration
public static QueryContainer Bool(Func<BoolQueryDescriptor<T>, IBoolQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Boosting(Func<BoostingQueryDescriptor<T>, IBoostingQuery>)
Declaration
public static QueryContainer Boosting(Func<BoostingQueryDescriptor<T>, IBoostingQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Conditionless(Func<ConditionlessQueryDescriptor<T>, IConditionlessQuery>)
Declaration
public static QueryContainer Conditionless(Func<ConditionlessQueryDescriptor<T>, IConditionlessQuery> selector)
Parameters
Returns
|
Edit this page
View Source
ConstantScore(Func<ConstantScoreQueryDescriptor<T>, IConstantScoreQuery>)
Declaration
public static QueryContainer ConstantScore(Func<ConstantScoreQueryDescriptor<T>, IConstantScoreQuery> selector)
Parameters
Returns
|
Edit this page
View Source
DateRange(Func<DateRangeQueryDescriptor<T>, IDateRangeQuery>)
Declaration
public static QueryContainer DateRange(Func<DateRangeQueryDescriptor<T>, IDateRangeQuery> selector)
Parameters
Returns
|
Edit this page
View Source
DisMax(Func<DisMaxQueryDescriptor<T>, IDisMaxQuery>)
Declaration
public static QueryContainer DisMax(Func<DisMaxQueryDescriptor<T>, IDisMaxQuery> selector)
Parameters
Returns
|
Edit this page
View Source
DistanceFeature(Func<DistanceFeatureQueryDescriptor<T>, IDistanceFeatureQuery>)
Boosts the relevance score of documents closer to a provided origin date or point. For example, you can use this query to give
more weight to documents closer to a certain date or location.
You can use the distance_feature query to find the nearest neighbors to a location. You can also use the query in a bool
search’s should filter to add boosted relevance scores to the bool query’s scores.
Declaration
public static QueryContainer DistanceFeature(Func<DistanceFeatureQueryDescriptor<T>, IDistanceFeatureQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Exists(Func<ExistsQueryDescriptor<T>, IExistsQuery>)
Declaration
public static QueryContainer Exists(Func<ExistsQueryDescriptor<T>, IExistsQuery> selector)
Parameters
Returns
|
Edit this page
View Source
FunctionScore(Func<FunctionScoreQueryDescriptor<T>, IFunctionScoreQuery>)
Declaration
public static QueryContainer FunctionScore(Func<FunctionScoreQueryDescriptor<T>, IFunctionScoreQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Fuzzy(Func<FuzzyQueryDescriptor<T>, IFuzzyQuery>)
Declaration
public static QueryContainer Fuzzy(Func<FuzzyQueryDescriptor<T>, IFuzzyQuery> selector)
Parameters
Returns
|
Edit this page
View Source
GeoBoundingBox(Func<GeoBoundingBoxQueryDescriptor<T>, IGeoBoundingBoxQuery>)
Declaration
public static QueryContainer GeoBoundingBox(Func<GeoBoundingBoxQueryDescriptor<T>, IGeoBoundingBoxQuery> selector)
Parameters
Returns
|
Edit this page
View Source
GeoDistance(Func<GeoDistanceQueryDescriptor<T>, IGeoDistanceQuery>)
Declaration
public static QueryContainer GeoDistance(Func<GeoDistanceQueryDescriptor<T>, IGeoDistanceQuery> selector)
Parameters
Returns
|
Edit this page
View Source
GeoPolygon(Func<GeoPolygonQueryDescriptor<T>, IGeoPolygonQuery>)
Declaration
public static QueryContainer GeoPolygon(Func<GeoPolygonQueryDescriptor<T>, IGeoPolygonQuery> selector)
Parameters
Returns
|
Edit this page
View Source
GeoShape(Func<GeoShapeQueryDescriptor<T>, IGeoShapeQuery>)
Declaration
public static QueryContainer GeoShape(Func<GeoShapeQueryDescriptor<T>, IGeoShapeQuery> selector)
Parameters
Returns
|
Edit this page
View Source
HasChild<TChild>(Func<HasChildQueryDescriptor<TChild>, IHasChildQuery>)
Declaration
public static QueryContainer HasChild<TChild>(Func<HasChildQueryDescriptor<TChild>, IHasChildQuery> selector) where TChild : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
HasParent<TParent>(Func<HasParentQueryDescriptor<TParent>, IHasParentQuery>)
Declaration
public static QueryContainer HasParent<TParent>(Func<HasParentQueryDescriptor<TParent>, IHasParentQuery> selector) where TParent : class
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Ids(Func<IdsQueryDescriptor, IIdsQuery>)
Declaration
public static QueryContainer Ids(Func<IdsQueryDescriptor, IIdsQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Intervals(Func<IntervalsQueryDescriptor<T>, IIntervalsQuery>)
A query that allows fine-grained control over the order and proximity of matching terms.
Matching rules are constructed from a small set of definitions, and the rules are then applied to terms from a
particular field.
The definitions produce sequences of minimal intervals that span terms in a body of text.
These intervals can be further combined and filtered by parent sources.
Declaration
public static QueryContainer Intervals(Func<IntervalsQueryDescriptor<T>, IIntervalsQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Knn(Func<KnnQueryDescriptor<T>, IKnnQuery>)
Declaration
public static QueryContainer Knn(Func<KnnQueryDescriptor<T>, IKnnQuery> selector)
Parameters
Returns
|
Edit this page
View Source
LongRange(Func<LongRangeQueryDescriptor<T>, ILongRangeQuery>)
Declaration
public static QueryContainer LongRange(Func<LongRangeQueryDescriptor<T>, ILongRangeQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Match(Func<MatchQueryDescriptor<T>, IMatchQuery>)
Declaration
public static QueryContainer Match(Func<MatchQueryDescriptor<T>, IMatchQuery> selector)
Parameters
Returns
|
Edit this page
View Source
MatchAll(Func<MatchAllQueryDescriptor, IMatchAllQuery>)
Declaration
public static QueryContainer MatchAll(Func<MatchAllQueryDescriptor, IMatchAllQuery> selector = null)
Parameters
Returns
|
Edit this page
View Source
MatchBoolPrefix(Func<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery>)
A match_bool_prefix query analyzes its input and constructs a bool query from the terms.
Each term except the last is used in a term query. The last term is used in a prefix query.
Declaration
public static QueryContainer MatchBoolPrefix(Func<MatchBoolPrefixQueryDescriptor<T>, IMatchBoolPrefixQuery> selector = null)
Parameters
Returns
|
Edit this page
View Source
MatchNone(Func<MatchNoneQueryDescriptor, IMatchNoneQuery>)
Declaration
public static QueryContainer MatchNone(Func<MatchNoneQueryDescriptor, IMatchNoneQuery> selector = null)
Parameters
Returns
|
Edit this page
View Source
MatchPhrase(Func<MatchPhraseQueryDescriptor<T>, IMatchPhraseQuery>)
Declaration
public static QueryContainer MatchPhrase(Func<MatchPhraseQueryDescriptor<T>, IMatchPhraseQuery> selector)
Parameters
Returns
|
Edit this page
View Source
MatchPhrasePrefix(Func<MatchPhrasePrefixQueryDescriptor<T>, IMatchPhrasePrefixQuery>)
Declaration
public static QueryContainer MatchPhrasePrefix(Func<MatchPhrasePrefixQueryDescriptor<T>, IMatchPhrasePrefixQuery> selector)
Parameters
Returns
|
Edit this page
View Source
MoreLikeThis(Func<MoreLikeThisQueryDescriptor<T>, IMoreLikeThisQuery>)
Declaration
public static QueryContainer MoreLikeThis(Func<MoreLikeThisQueryDescriptor<T>, IMoreLikeThisQuery> selector)
Parameters
Returns
|
Edit this page
View Source
MultiMatch(Func<MultiMatchQueryDescriptor<T>, IMultiMatchQuery>)
Declaration
public static QueryContainer MultiMatch(Func<MultiMatchQueryDescriptor<T>, IMultiMatchQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Nested(Func<NestedQueryDescriptor<T>, INestedQuery>)
Declaration
public static QueryContainer Nested(Func<NestedQueryDescriptor<T>, INestedQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Neural(Func<NeuralQueryDescriptor<T>, INeuralQuery>)
Declaration
public static QueryContainer Neural(Func<NeuralQueryDescriptor<T>, INeuralQuery> selector)
Parameters
Returns
|
Edit this page
View Source
ParentId(Func<ParentIdQueryDescriptor<T>, IParentIdQuery>)
Declaration
public static QueryContainer ParentId(Func<ParentIdQueryDescriptor<T>, IParentIdQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Percolate(Func<PercolateQueryDescriptor<T>, IPercolateQuery>)
Declaration
public static QueryContainer Percolate(Func<PercolateQueryDescriptor<T>, IPercolateQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Prefix(Field, string, double?, MultiTermQueryRewrite, string)
Declaration
public static QueryContainer Prefix(Field field, string value, double? boost = null, MultiTermQueryRewrite rewrite = null, string name = null)
Parameters
Returns
|
Edit this page
View Source
Prefix(Func<PrefixQueryDescriptor<T>, IPrefixQuery>)
Declaration
public static QueryContainer Prefix(Func<PrefixQueryDescriptor<T>, IPrefixQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Prefix<TValue>(Expression<Func<T, TValue>>, string, double?, MultiTermQueryRewrite, string)
Declaration
public static QueryContainer Prefix<TValue>(Expression<Func<T, TValue>> fieldDescriptor, string value, double? boost = null, MultiTermQueryRewrite rewrite = null, string name = null)
Parameters
Returns
Type Parameters
|
Edit this page
View Source
QueryString(Func<QueryStringQueryDescriptor<T>, IQueryStringQuery>)
Declaration
public static QueryContainer QueryString(Func<QueryStringQueryDescriptor<T>, IQueryStringQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Range(Func<NumericRangeQueryDescriptor<T>, INumericRangeQuery>)
Declaration
public static QueryContainer Range(Func<NumericRangeQueryDescriptor<T>, INumericRangeQuery> selector)
Parameters
Returns
|
Edit this page
View Source
RankFeature(Func<RankFeatureQueryDescriptor<T>, IRankFeatureQuery>)
A query that only works on rank_feature fields and rank_features fields. Its goal is to boost the score of documents
based on the values of numeric features. It is typically put in a should clause of a bool query so that its score
is added to the score of the query.
Compared to using function_score or other ways to modify the score, this query has the benefit of being able to efficiently
skip non-competitive hits when track_total_hits is not set to true. Speedups may be spectacular.
Declaration
public static QueryContainer RankFeature(Func<RankFeatureQueryDescriptor<T>, IRankFeatureQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Regexp(Func<RegexpQueryDescriptor<T>, IRegexpQuery>)
Declaration
public static QueryContainer Regexp(Func<RegexpQueryDescriptor<T>, IRegexpQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Script(Func<ScriptQueryDescriptor<T>, IScriptQuery>)
Declaration
public static QueryContainer Script(Func<ScriptQueryDescriptor<T>, IScriptQuery> selector)
Parameters
Returns
|
Edit this page
View Source
ScriptScore(Func<ScriptScoreQueryDescriptor<T>, IScriptScoreQuery>)
A query allowing you to modify the score of documents that are retrieved by a query.
This can be useful if, for example, a score function is computationally expensive and it is sufficient to
compute the score on a filtered set of documents.
Declaration
public static QueryContainer ScriptScore(Func<ScriptScoreQueryDescriptor<T>, IScriptScoreQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Shape(Func<ShapeQueryDescriptor<T>, IShapeQuery>)
Declaration
public static QueryContainer Shape(Func<ShapeQueryDescriptor<T>, IShapeQuery> selector)
Parameters
Returns
|
Edit this page
View Source
SimpleQueryString(Func<SimpleQueryStringQueryDescriptor<T>, ISimpleQueryStringQuery>)
Declaration
public static QueryContainer SimpleQueryString(Func<SimpleQueryStringQueryDescriptor<T>, ISimpleQueryStringQuery> selector)
Parameters
Returns
|
Edit this page
View Source
SpanContaining(Func<SpanContainingQueryDescriptor<T>, ISpanContainingQuery>)
Declaration
public static QueryContainer SpanContaining(Func<SpanContainingQueryDescriptor<T>, ISpanContainingQuery> selector)
Parameters
Returns
|
Edit this page
View Source
SpanFieldMasking(Func<SpanFieldMaskingQueryDescriptor<T>, ISpanFieldMaskingQuery>)
Declaration
public static QueryContainer SpanFieldMasking(Func<SpanFieldMaskingQueryDescriptor<T>, ISpanFieldMaskingQuery> selector)
Parameters
Returns
|
Edit this page
View Source
SpanFirst(Func<SpanFirstQueryDescriptor<T>, ISpanFirstQuery>)
Declaration
public static QueryContainer SpanFirst(Func<SpanFirstQueryDescriptor<T>, ISpanFirstQuery> selector)
Parameters
Returns
|
Edit this page
View Source
SpanMultiTerm(Func<SpanMultiTermQueryDescriptor<T>, ISpanMultiTermQuery>)
Declaration
public static QueryContainer SpanMultiTerm(Func<SpanMultiTermQueryDescriptor<T>, ISpanMultiTermQuery> selector)
Parameters
Returns
|
Edit this page
View Source
SpanNear(Func<SpanNearQueryDescriptor<T>, ISpanNearQuery>)
Declaration
public static QueryContainer SpanNear(Func<SpanNearQueryDescriptor<T>, ISpanNearQuery> selector)
Parameters
Returns
|
Edit this page
View Source
SpanNot(Func<SpanNotQueryDescriptor<T>, ISpanNotQuery>)
Declaration
public static QueryContainer SpanNot(Func<SpanNotQueryDescriptor<T>, ISpanNotQuery> selector)
Parameters
Returns
|
Edit this page
View Source
SpanOr(Func<SpanOrQueryDescriptor<T>, ISpanOrQuery>)
Declaration
public static QueryContainer SpanOr(Func<SpanOrQueryDescriptor<T>, ISpanOrQuery> selector)
Parameters
Returns
|
Edit this page
View Source
SpanTerm(Func<SpanTermQueryDescriptor<T>, ISpanTermQuery>)
Declaration
public static QueryContainer SpanTerm(Func<SpanTermQueryDescriptor<T>, ISpanTermQuery> selector)
Parameters
Returns
|
Edit this page
View Source
SpanWithin(Func<SpanWithinQueryDescriptor<T>, ISpanWithinQuery>)
Declaration
public static QueryContainer SpanWithin(Func<SpanWithinQueryDescriptor<T>, ISpanWithinQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Term(Field, object, double?, string)
Declaration
public static QueryContainer Term(Field field, object value, double? boost = null, string name = null)
Parameters
Returns
|
Edit this page
View Source
Term(Func<TermQueryDescriptor<T>, ITermQuery>)
Declaration
public static QueryContainer Term(Func<TermQueryDescriptor<T>, ITermQuery> selector)
Parameters
Returns
|
Edit this page
View Source
TermRange(Func<TermRangeQueryDescriptor<T>, ITermRangeQuery>)
Declaration
public static QueryContainer TermRange(Func<TermRangeQueryDescriptor<T>, ITermRangeQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Term<TValue>(Expression<Func<T, TValue>>, object, double?, string)
Declaration
public static QueryContainer Term<TValue>(Expression<Func<T, TValue>> fieldDescriptor, object value, double? boost = null, string name = null)
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Terms(Func<TermsQueryDescriptor<T>, ITermsQuery>)
Declaration
public static QueryContainer Terms(Func<TermsQueryDescriptor<T>, ITermsQuery> selector)
Parameters
Returns
|
Edit this page
View Source
TermsSet(Func<TermsSetQueryDescriptor<T>, ITermsSetQuery>)
Declaration
public static QueryContainer TermsSet(Func<TermsSetQueryDescriptor<T>, ITermsSetQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Wildcard(Field, string, double?, MultiTermQueryRewrite, string)
Declaration
public static QueryContainer Wildcard(Field field, string value, double? boost = null, MultiTermQueryRewrite rewrite = null, string name = null)
Parameters
Returns
|
Edit this page
View Source
Wildcard(Func<WildcardQueryDescriptor<T>, IWildcardQuery>)
Declaration
public static QueryContainer Wildcard(Func<WildcardQueryDescriptor<T>, IWildcardQuery> selector)
Parameters
Returns
|
Edit this page
View Source
Wildcard<TValue>(Expression<Func<T, TValue>>, string, double?, MultiTermQueryRewrite, string)
Declaration
public static QueryContainer Wildcard<TValue>(Expression<Func<T, TValue>> fieldDescriptor, string value, double? boost = null, MultiTermQueryRewrite rewrite = null, string name = null)
Parameters
Returns
Type Parameters