diff --git a/docs/Query/FuzzyLikeThisQuery.md b/docs/Query/FuzzyLikeThisQuery.md new file mode 100644 index 0000000000000000000000000000000000000000..de05d402fc240fac5bca315f9d92008d231b2e94 --- /dev/null +++ b/docs/Query/FuzzyLikeThisQuery.md @@ -0,0 +1,34 @@ +# Fuzzy Like This Query + +> More info about fuzzy like this field query is in the [official elasticsearch docs][1] + +Fuzzy like this query find documents that are "like" provided text by running it against one or more fields. + +## Simple example + +```JSON +{ + "fuzzy_like_this" : { + "fields" : ["name.first", "name.last"], + "like_text" : "text like this one", + "max_query_terms" : 12 + } +} +``` + +In DSL: + +```php +$fuzzyLikeThisQuery = new FuzzyLikeThisQuery( + ['name.first', 'name.last'], + 'text like this one', + [ 'max_query_terms' => 12 ] +); + +$search = new Search(); +$search->addQuery($fuzzyLikeThisQuery); + +$queryArray = $search->toArray(); +``` + +[1]: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-flt-query.html