Module queries

Source
Expand description

Allows constructing Elasticsearch search query.

Elasticsearch provides a full Query DSL (Domain Specific Language) based on JSON to define queries. Think of the Query DSL as an AST (Abstract Syntax Tree) of queries, consisting of two types of clauses:

Leaf query clauses

Leaf query clauses look for a particular value in a particular field, such as the match, term or range queries. These queries can be used by themselves.

Compound query clauses

Compound query clauses wrap other leaf or compound queries and are used to combine multiple queries in a logical fashion (such as the bool or dis_max query), or to alter their behavior (such as the constant_score query).

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html

Re-exports§

pub use self::compound::*;
pub use self::custom::*;
pub use self::full_text::*;
pub use self::geo::*;
pub use self::joining::*;
pub use self::shape::*;
pub use self::span::*;
pub use self::specialized::*;
pub use self::term_level::*;

Modules§

compound
Compound queries wrap other compound or leaf queries, either to combine their results and scores, to change their behavior, or to switch from query to filter context.
custom
Non official queries, such as plugins or raw JSON queries
full_text
The full text queries enable you to search analyzed text fields such as the body of an email. The query string is processed using the same analyzer that was applied to the field during indexing.
geo
Elasticsearch supports two types of geo data: geo_point fields which support lat/lon pairs, and geo_shape fields, which support points, lines, circles, polygons, multi-polygons, etc.
joining
Performing full SQL-style joins in a distributed system like Elasticsearch is prohibitively expensive. Instead, Elasticsearch offers two forms of join which are designed to scale horizontally.
params
Strongly typed Elasticsearch query params
shape
Like geo_shape Elasticsearch supports the ability to index arbitrary two dimension (non Geospatial) geometries making it possible to map out virtual worlds, sporting venues, theme parks, and CAD diagrams.
span
Span queries are low-level positional queries which provide expert control over the order and proximity of the specified terms. These are typically used to implement very specific queries on legal documents or patents.
specialized
This group contains queries which do not fit into the other groups
term_level
You can use term-level queries to find documents based on precise values in structured data. Examples of structured data include date ranges, IP addresses, prices, or product IDs.

Structs§

MatchAllQuery
The most simple query, which matches all documents, giving them all a _score of 1.0.
MatchNoneQuery
This is the inverse of the match_all query, which matches no documents.
QueryCollection
A collection of queries

Enums§

Query
A container enum for supported Elasticsearch query types