-
Aivaras Gotovskis authoredAivaras Gotovskis authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
FuzzyLikeThisQuery.md 771 B
Fuzzy Like This Query
More info about fuzzy like this field query is in the official elasticsearch docs
Fuzzy like this query find documents that are "like" provided text by running it against one or more fields.
Simple example
{
"fuzzy_like_this" : {
"fields" : ["name.first", "name.last"],
"like_text" : "text like this one",
"max_query_terms" : 12
}
}
In DSL:
$fuzzyLikeThisQuery = new FuzzyLikeThisQuery(
['name.first', 'name.last'],
'text like this one',
[ 'max_query_terms' => 12 ]
);
$search = new Search();
$search->addQuery($fuzzyLikeThisQuery);
$queryArray = $search->toArray();