FuzzyQuery   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace olvlvl\ElasticsearchDSL\Query\Term;
4
5
use olvlvl\ElasticsearchDSL\Query\Helpers\JsonSerializeAsSimpleOrExtended;
6
use olvlvl\ElasticsearchDSL\Query\Option\BoostOption;
7
use olvlvl\ElasticsearchDSL\Query\Option\FuzzyOptions;
8
use olvlvl\ElasticsearchDSL\Query\Option\HasBoostOption;
9
use olvlvl\ElasticsearchDSL\Query\Option\HasFuzzyOptions;
10
use olvlvl\ElasticsearchDSL\Query\QueryAbstract;
11
12
/**
13
 * @see https://www.elastic.co/guide/en/elasticsearch/reference/5.6/query-dsl-fuzzy-query.html
14
 */
15
class FuzzyQuery extends QueryAbstract implements HasFuzzyOptions, HasBoostOption
16
{
17
	use FuzzyOptions;
18
	use BoostOption;
19
	use JsonSerializeAsSimpleOrExtended {
20
		jsonSerializeAsSimpleOrExtended as public jsonSerialize;
21
	}
22
23
	const NAME = 'fuzzy';
24
25
26
	/**
27
	 * @var string
28
	 */
29
	private $field;
30
31
	/**
32
	 * @var mixed
33
	 */
34
	private $value;
35
36
	public function __construct(string $field, $value)
37
	{
38
		$this->field = $field;
39
		$this->value = $value;
40
	}
41
}
42