Enum Query

Source
pub enum Query {
Show 31 variants MatchAll(Box<MatchAllQuery>), Match(Box<MatchQuery>), MultiMatch(Box<MultiMatchQuery>), Common(Box<CommonQuery>), QueryString(Box<QueryStringQuery>), SimpleQueryString(Box<SimpleQueryStringQuery>), Term(Box<TermQuery>), Terms(Box<TermsQuery>), Range(Box<RangeQuery>), Exists(Box<ExistsQuery>), Prefix(Box<PrefixQuery>), Wildcard(Box<WildcardQuery>), Regexp(Box<RegexpQuery>), Fuzzy(Box<FuzzyQuery>), Type(Box<TypeQuery>), Ids(Box<IdsQuery>), ConstantScore(Box<ConstantScoreQuery>), Bool(Box<BoolQuery>), DisMax(Box<DisMaxQuery>), FunctionScore(Box<FunctionScoreQuery>), Boosting(Box<BoostingQuery>), Indices(Box<IndicesQuery>), Nested(Box<NestedQuery>), HasChild(Box<HasChildQuery>), HasParent(Box<HasParentQuery>), GeoShape(Box<GeoShapeQuery>), GeoBoundingBox(Box<GeoBoundingBoxQuery>), GeoDistance(Box<GeoDistanceQuery>), GeoPolygon(Box<GeoPolygonQuery>), GeohashCell(Box<GeohashCellQuery>), MoreLikeThis(Box<MoreLikeThisQuery>),
}
Expand description

Query represents all available queries

Each value is boxed as Queries can be recursive, they also vary significantly in size

Variants§

§

MatchAll(Box<MatchAllQuery>)

§

Match(Box<MatchQuery>)

§

MultiMatch(Box<MultiMatchQuery>)

§

Common(Box<CommonQuery>)

§

QueryString(Box<QueryStringQuery>)

§

SimpleQueryString(Box<SimpleQueryStringQuery>)

§

Term(Box<TermQuery>)

§

Terms(Box<TermsQuery>)

§

Range(Box<RangeQuery>)

§

Exists(Box<ExistsQuery>)

§

Prefix(Box<PrefixQuery>)

§

Wildcard(Box<WildcardQuery>)

§

Regexp(Box<RegexpQuery>)

§

Fuzzy(Box<FuzzyQuery>)

§

Type(Box<TypeQuery>)

§

Ids(Box<IdsQuery>)

§

ConstantScore(Box<ConstantScoreQuery>)

§

Bool(Box<BoolQuery>)

§

DisMax(Box<DisMaxQuery>)

§

FunctionScore(Box<FunctionScoreQuery>)

§

Boosting(Box<BoostingQuery>)

§

Indices(Box<IndicesQuery>)

§

Nested(Box<NestedQuery>)

§

HasChild(Box<HasChildQuery>)

§

HasParent(Box<HasParentQuery>)

§

GeoShape(Box<GeoShapeQuery>)

§

GeoBoundingBox(Box<GeoBoundingBoxQuery>)

§

GeoDistance(Box<GeoDistanceQuery>)

§

GeoPolygon(Box<GeoPolygonQuery>)

§

GeohashCell(Box<GeohashCellQuery>)

§

MoreLikeThis(Box<MoreLikeThisQuery>)

Implementations§

Source§

impl Query

Source

pub fn build_constant_score<A>(query: A) -> ConstantScoreQuery
where A: Into<Query>,

Source§

impl Query

Source§

impl Query

Source

pub fn build_dis_max<A>(queries: A) -> DisMaxQuery
where A: Into<Vec<Query>>,

Source§

impl Query

Source§

impl Query

Source§

impl Query

Source

pub fn build_indices<A, B>(indices: A, query: B) -> IndicesQuery
where A: Into<OneOrMany<String>>, B: Into<Query>,

Source§

impl Query

Source

pub fn build_match<A, B>(field: A, query: B) -> MatchQuery
where A: Into<String>, B: Into<JsonVal>,

Source§

impl Query

Source

pub fn build_multi_match<A, B>(fields: A, query: B) -> MultiMatchQuery
where A: Into<Vec<String>>, B: Into<JsonVal>,

Source§

impl Query

Source

pub fn build_common<A>(query: A) -> CommonQuery
where A: Into<JsonVal>,

Source§

impl Query

Source§

impl Query

Source§

impl Query

Source

pub fn build_geo_shape<A>(field: A) -> GeoShapeQuery
where A: Into<String>,

Source§

impl Query

Source

pub fn build_geo_bounding_box<A, B>(field: A, geo_box: B) -> GeoBoundingBoxQuery
where A: Into<String>, B: Into<GeoBox>,

Source§

impl Query

Source

pub fn build_geo_distance<A, B, C>( field: A, location: B, distance: C, ) -> GeoDistanceQuery
where A: Into<String>, B: Into<Location>, C: Into<Distance>,

Source§

impl Query

Source

pub fn build_geo_polygon<A, B>(field: A, points: B) -> GeoPolygonQuery
where A: Into<String>, B: Into<Vec<Location>>,

Source§

impl Query

Source

pub fn build_geohash_cell<A, B>(field: A, location: B) -> GeohashCellQuery
where A: Into<String>, B: Into<Location>,

Source§

impl Query

Source

pub fn build_nested<A, B>(path: A, query: B) -> NestedQuery
where A: Into<String>, B: Into<Query>,

Source§

impl Query

Source

pub fn build_has_child<A, B>(doc_type: A, query: B) -> HasChildQuery
where A: Into<String>, B: Into<Query>,

Source

pub fn build_has_parent<A, B>(parent_type: A, query: B) -> HasParentQuery
where A: Into<String>, B: Into<Query>,

Source§

impl Query

Source§

impl Query

Source

pub fn build_term<A, B>(field: A, value: B) -> TermQuery
where A: Into<String>, B: Into<JsonVal>,

Source§

impl Query

Source

pub fn build_terms<A>(field: A) -> TermsQuery
where A: Into<String>,

Source§

impl Query

Source

pub fn build_range<A>(field: A) -> RangeQuery
where A: Into<String>,

Source§

impl Query

Source

pub fn build_exists<A>(field: A) -> ExistsQuery
where A: Into<String>,

Source§

impl Query

Source

pub fn build_prefix<A, B>(field: A, value: B) -> PrefixQuery
where A: Into<String>, B: Into<String>,

Source§

impl Query

Source

pub fn build_wildcard<A, B>(field: A, value: B) -> WildcardQuery
where A: Into<String>, B: Into<String>,

Source§

impl Query

Source

pub fn build_query<A, B>(field: A, value: B) -> RegexpQuery
where A: Into<String>, B: Into<String>,

Source§

impl Query

Source

pub fn build_fuzzy<A, B>(field: A, value: B) -> FuzzyQuery
where A: Into<String>, B: Into<String>,

Source§

impl Query

Source

pub fn build_type<A>(value: A) -> TypeQuery
where A: Into<String>,

Source§

impl Query

Source

pub fn build_ids<A>(values: A) -> IdsQuery
where A: Into<Vec<JsonVal>>,

Source§

impl Query

Trait Implementations§

Source§

impl Debug for Query

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Query

Source§

fn default() -> Query

Returns the “default value” for a type. Read more
Source§

impl From<Query> for NoMatchQuery

Source§

fn from(from: Query) -> NoMatchQuery

Converts to this type from the input type.
Source§

impl Serialize for Query

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Query

§

impl RefUnwindSafe for Query

§

impl Send for Query

§

impl Sync for Query

§

impl Unpin for Query

§

impl UnwindSafe for Query

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Err = <U as TryFrom<T>>::Err

Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Err>

Source§

impl<T> ErasedDestructor for T
where T: 'static,