term-level-queries.asciidoc 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. [[term-level-queries]]
  2. == Term level queries
  3. While the <<full-text-queries,full text queries>> will analyze the query
  4. string before executing, the _term-level queries_ operate on the exact terms
  5. that are stored in the inverted index.
  6. These queries are usually used for structured data like numbers, dates, and
  7. enums, rather than full text fields. Alternatively, they allow you to craft
  8. low-level queries, foregoing the analysis process.
  9. The queries in this group are:
  10. <<query-dsl-term-query,`term` query>>::
  11. Find documents which contain the exact term specified in the field
  12. specified.
  13. <<query-dsl-terms-query,`terms` query>>::
  14. Find documents which contain any of the exact terms specified in the field
  15. specified.
  16. <<query-dsl-range-query,`range` query>>::
  17. Find documents where the field specified contains values (dates, numbers,
  18. or strings) in the range specified.
  19. <<query-dsl-exists-query,`exists` query>>::
  20. Find documents where the field specified contains any non-null value.
  21. <<query-dsl-missing-query,`missing` query>>::
  22. Find documents where the field specified does is missing or contains only
  23. `null` values.
  24. <<query-dsl-prefix-query,`prefix` query>>::
  25. Find documents where the field specified contains terms which being with
  26. the exact prefix specified.
  27. <<query-dsl-wildcard-query,`wildcard` query>>::
  28. Find documents where the field specified contains terms which match the
  29. pattern specified, where the pattern supports single character wildcards
  30. (`?`) and multi-character wildcards (`*`)
  31. <<query-dsl-regexp-query,`regexp` query>>::
  32. Find documents where the field specified contains terms which match the
  33. <<regexp-syntax,regular expression>> specified.
  34. <<query-dsl-fuzzy-query,`fuzzy` query>>::
  35. Find documents where the field specified contains terms which are fuzzily
  36. similar to the specified term. Fuzziness is measured as a
  37. http://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance[Levenshtein edit distance]
  38. of 1 or 2.
  39. <<query-dsl-type-query,`type` query>>::
  40. Find documents of the specified type.
  41. <<query-dsl-ids-query,`ids` query>>::
  42. Find documents with the specified type and IDs.
  43. include::term-query.asciidoc[]
  44. include::terms-query.asciidoc[]
  45. include::range-query.asciidoc[]
  46. include::exists-query.asciidoc[]
  47. include::missing-query.asciidoc[]
  48. include::prefix-query.asciidoc[]
  49. include::wildcard-query.asciidoc[]
  50. include::regexp-query.asciidoc[]
  51. include::fuzzy-query.asciidoc[]
  52. include::type-query.asciidoc[]
  53. include::ids-query.asciidoc[]