WARNING: Version 2.0 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Term level queries
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Term level queries
editWhile the full text queries will analyze the query string before executing, the term-level queries operate on the exact terms that are stored in the inverted index.
These queries are usually used for structured data like numbers, dates, and enums, rather than full text fields. Alternatively, they allow you to craft low-level queries, foregoing the analysis process.
The queries in this group are:
-
termquery - Find documents which contain the exact term specified in the field specified.
-
termsquery - Find documents which contain any of the exact terms specified in the field specified.
-
rangequery - Find documents where the field specified contains values (dates, numbers, or strings) in the range specified.
-
existsquery - Find documents where the field specified contains any non-null value.
-
missingquery -
Find documents where the field specified does is missing or contains only
nullvalues. -
prefixquery - Find documents where the field specified contains terms which being with the exact prefix specified.
-
wildcardquery -
Find documents where the field specified contains terms which match the
pattern specified, where the pattern supports single character wildcards
(
?) and multi-character wildcards (*) -
regexpquery - Find documents where the field specified contains terms which match the regular expression specified.
-
fuzzyquery - Find documents where the field specified contains terms which are fuzzily similar to the specified term. Fuzziness is measured as a Levenshtein edit distance of 1 or 2.
-
typequery - Find documents of the specified type.
-
idsquery - Find documents with the specified type and IDs.