[[term-level-queries]]
== Term-level queries

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.

Unlike <<full-text-queries, full-text queries>>, term-level queries do not
analyze search terms. Instead, term-level queries match the exact terms stored
in a field.


[NOTE]
====
Term-level queries still normalize search terms for `keyword` fields with the
`normalizer` property. For more details, see <<normalizer, `normalizer`>>.
====

[float]
[[term-level-query-types]]
=== Types of term-level queries

<<query-dsl-term-query,`term` query>>::
Returns documents that contain an exact term in a provided field.

<<query-dsl-terms-query,`terms` query>>::
Returns documents that contain one or more exact terms in a provided field.

<<query-dsl-terms-set-query,`terms_set` query>>::
Returns documents that contain a minimum number of exact terms in a provided
field. You can define the minimum number of matching terms using a field or
script.

<<query-dsl-range-query,`range` query>>::
Returns documents that contain terms within a provided range.

<<query-dsl-exists-query,`exists` query>>::
Returns documents that contain any indexed value for a field.

<<query-dsl-prefix-query,`prefix` query>>::
Returns documents that contain a specific prefix in a provided field.

<<query-dsl-wildcard-query,`wildcard` query>>::
Returns documents that contain terms matching a wildcard pattern.

<<query-dsl-regexp-query,`regexp` query>>::
Returns documents that contain terms matching a
https://en.wikipedia.org/wiki/Regular_expression[regular expression].

<<query-dsl-fuzzy-query,`fuzzy` query>>::
Returns documents that contain terms similar to the search term. {es} measures
similarity, or fuzziness, using a
http://en.wikipedia.org/wiki/Levenshtein_distance[Levenshtein edit distance].

<<query-dsl-type-query,`type` query>>::

Returns documents of the specified type.

<<query-dsl-ids-query,`ids` query>>::
Returns documents based on their <<mapping-id-field, document IDs>>. 


include::term-query.asciidoc[]

include::terms-query.asciidoc[]

include::terms-set-query.asciidoc[]

include::range-query.asciidoc[]

include::exists-query.asciidoc[]

include::prefix-query.asciidoc[]

include::wildcard-query.asciidoc[]

include::regexp-query.asciidoc[]

include::fuzzy-query.asciidoc[]

include::type-query.asciidoc[]

include::ids-query.asciidoc[]
