OpenSearch/docs/reference/query-dsl.asciidoc

54 lines
1.6 KiB
Plaintext
Raw Normal View History

[[query-dsl]]
= Query DSL
[partintro]
--
2017-12-11 12:05:39 -05:00
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
<<query-dsl-match-query,`match`>>, <<query-dsl-term-query,`term`>> or
<<query-dsl-range-query,`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
<<query-dsl-bool-query,`bool`>> or <<query-dsl-dis-max-query,`dis_max`>> query),
or to alter their behaviour (such as the
<<query-dsl-constant-score-query,`constant_score`>> query).
Query clauses behave differently depending on whether they are used in
<<query-filter-context,query context or filter context>>.
--
include::query-dsl/query_filter_context.asciidoc[]
include::query-dsl/compound-queries.asciidoc[]
include::query-dsl/full-text-queries.asciidoc[]
include::query-dsl/geo-queries.asciidoc[]
[SPATIAL] Backport new ShapeFieldMapper and ShapeQueryBuilder to 7x (#45363) * Introduce Spatial Plugin (#44389) Introduce a skeleton Spatial plugin that holds new licensed features coming to Geo/Spatial land! * [GEO] Refactor DeprecatedParameters in AbstractGeometryFieldMapper (#44923) Refactor DeprecatedParameters specific to legacy geo_shape out of AbstractGeometryFieldMapper.TypeParser#parse. * [SPATIAL] New ShapeFieldMapper for indexing cartesian geometries (#44980) Add a new ShapeFieldMapper to the xpack spatial module for indexing arbitrary cartesian geometries using a new field type called shape. The indexing approach leverages lucene's new XYShape field type which is backed by BKD in the same manner as LatLonShape but without the WGS84 latitude longitude restrictions. The new field mapper builds on and extends the refactoring effort in AbstractGeometryFieldMapper and accepts shapes in either GeoJSON or WKT format (both of which support non geospatial geometries). Tests are provided in the ShapeFieldMapperTest class in the same manner as GeoShapeFieldMapperTests and LegacyGeoShapeFieldMapperTests. Documentation for how to use the new field type and what parameters are accepted is included. The QueryBuilder for searching indexed shapes is provided in a separate commit. * [SPATIAL] New ShapeQueryBuilder for querying indexed cartesian geometry (#45108) Add a new ShapeQueryBuilder to the xpack spatial module for querying arbitrary Cartesian geometries indexed using the new shape field type. The query builder extends AbstractGeometryQueryBuilder and leverages the ShapeQueryProcessor added in the previous field mapper commit. Tests are provided in ShapeQueryTests in the same manner as GeoShapeQueryTests and docs are updated to explain how the query works.
2019-08-14 17:35:10 -04:00
include::query-dsl/shape-queries.asciidoc[]
include::query-dsl/joining-queries.asciidoc[]
include::query-dsl/match-all-query.asciidoc[]
include::query-dsl/span-queries.asciidoc[]
include::query-dsl/special-queries.asciidoc[]
include::query-dsl/term-level-queries.asciidoc[]
include::query-dsl/minimum-should-match.asciidoc[]
2019-07-24 08:37:37 -04:00
include::query-dsl/multi-term-rewrite.asciidoc[]
include::query-dsl/regexp-syntax.asciidoc[]