Skip to content
Snippets Groups Projects
Commit a2e86167 authored by Mantas Var's avatar Mantas Var
Browse files

Merge pull request #63 from mvar/deprecate_fuzzy_like_this

Mark FuzzyLikeThis classes as deprecated
parents 9dc483de 88304cf3
No related branches found
No related tags found
No related merge requests found
CHANGELOG
=========
v1.x (2016-x)
---
- Deprecated `FuzzyLikeThisQuery` and `FuzzyLikeThisFieldQuery` queries
v1.1.1 (2016-01-26)
---
......
# Fuzzy Like This Field Query
__DEPRECATED__: this query is deprecated and will be removed in ElasticsearchDSL 2.0
> More info about fuzzy like this field query is in the [official elasticsearch docs][1]
......
# Fuzzy Like This Query
__DEPRECATED__: this query is deprecated and will be removed in ElasticsearchDSL 2.0
> More info about fuzzy like this field query is in the [official elasticsearch docs][1]
......
......@@ -16,6 +16,8 @@ use ONGR\ElasticsearchDSL\ParametersTrait;
/**
* Elasticsearch fuzzy_like_this_field query class.
*
* @deprecated Will be removed in 2.0.
*/
class FuzzyLikeThisFieldQuery implements BuilderInterface
{
......@@ -38,6 +40,11 @@ class FuzzyLikeThisFieldQuery implements BuilderInterface
*/
public function __construct($field, $likeText, array $parameters = [])
{
@trigger_error(
'The FuzzyLikeThisFieldQuery class is deprecated and will be removed in 2.0.',
E_USER_DEPRECATED
);
$this->field = $field;
$this->likeText = $likeText;
$this->setParameters($parameters);
......
......@@ -16,6 +16,8 @@ use ONGR\ElasticsearchDSL\ParametersTrait;
/**
* Elasticsearch fuzzy_like_this query class.
*
* @deprecated Will be removed in 2.0.
*/
class FuzzyLikeThisQuery implements BuilderInterface
{
......@@ -38,6 +40,11 @@ class FuzzyLikeThisQuery implements BuilderInterface
*/
public function __construct($fields, $likeText, array $parameters = [])
{
@trigger_error(
'The FuzzyLikeThisQuery class is deprecated and will be removed in 2.0.',
E_USER_DEPRECATED
);
if (!is_array($fields)) {
$fields = explode(',', $fields);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment