Module rs_es::query [] [src]

Implementation of the ElasticSearch Query DSL.

ElasticSearch offers a rich DSL for searches. It is JSON based, and therefore very easy to use and composable if using from a dynamic language (e.g. Ruby); but Rust, being a staticly-typed language, things are different. The rs_es::query module defines a set of builder objects which can be similarly composed to the same ends.

For example:

use rs_es::query::Query;

let query = Query::build_bool()
    .with_must(vec![Query::build_term("field_a",
                                      "value").build(),
                    Query::build_range("field_b")
                          .with_gte(5)
                          .with_lt(10)
                          .build()])
    .build();

Modules

compound

Compound queries

full_text

Implementations of full-text ES queries

functions

Specific options for the Function option of various queries

geo

Geo queries

joining

Joining queries

specialized

Specialised queries

term

Specific Term level queries

Structs

CombinationMinimumShouldMatch

Minimum should match - used in numerous queries TODO: should go somewhere specific

Flags

Flags - multiple operations can take a set of flags, each set is dependent on the operation in question, but they're all formatted to a similar looking String

MatchAllQuery

Match all query

Enums

Fuzziness

Fuzziness

MinimumShouldMatch
Query

Query represents all available queries

ScoreMode

ScoreMode