flt-field-query.asciidoc 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. [[query-dsl-flt-field-query]]
  2. === Fuzzy Like This Field Query
  3. The `fuzzy_like_this_field` query is the same as the `fuzzy_like_this`
  4. query, except that it runs against a single field. It provides nicer
  5. query DSL over the generic `fuzzy_like_this` query, and support typed
  6. fields query (automatically wraps typed fields with type filter to match
  7. only on the specific type).
  8. [source,js]
  9. --------------------------------------------------
  10. {
  11. "fuzzy_like_this_field" : {
  12. "name.first" : {
  13. "like_text" : "text like this one",
  14. "max_query_terms" : 12
  15. }
  16. }
  17. }
  18. --------------------------------------------------
  19. `fuzzy_like_this_field` can be shortened to `flt_field`.
  20. The `fuzzy_like_this_field` top level parameters include:
  21. [cols="<,<",options="header",]
  22. |=======================================================================
  23. |Parameter |Description
  24. |`like_text` |The text to find documents like it, *required*.
  25. |`ignore_tf` |Should term frequency be ignored. Defaults to `false`.
  26. |`max_query_terms` |The maximum number of query terms that will be
  27. included in any generated query. Defaults to `25`.
  28. |`fuzziness` |The fuzziness of the term variants. Defaults
  29. to `0.5`. See <<fuzziness>>.
  30. |`prefix_length` |Length of required common prefix on variant terms.
  31. Defaults to `0`.
  32. |`boost` |Sets the boost value of the query. Defaults to `1.0`.
  33. |`analyzer` |The analyzer that will be used to analyze the text.
  34. Defaults to the analyzer associated with the field.
  35. |=======================================================================