1 | <?php |
||
12 | class Wildcard extends AbstractQuery |
||
13 | { |
||
14 | /** |
||
15 | * Rewrite methods: @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-term-rewrite.html. |
||
16 | */ |
||
17 | public const REWRITE_CONSTANT_SCORE = 'constant_score'; |
||
18 | public const REWRITE_CONSTANT_SCORE_BOOLEAN = 'constant_score_boolean'; |
||
19 | public const REWRITE_SCORING_BOOLEAN = 'scoring_boolean'; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $field; |
||
25 | |||
26 | public function __construct(string $field, string $value, float $boost = 1.0, bool $caseInsensitive = false) |
||
36 | |||
37 | public function getField(): string |
||
41 | |||
42 | public function setValue(string $value): self |
||
49 | |||
50 | public function setBoost(float $boost): self |
||
57 | |||
58 | /** |
||
59 | * Set the method used to rewrite the query. |
||
60 | * Use one of the Wildcard::REWRITE_* constants, or provide your own. |
||
61 | * |
||
62 | * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-term-rewrite.html |
||
63 | */ |
||
64 | public function setRewrite(string $rewriteMode): self |
||
71 | |||
72 | public function setCaseInsensitive(bool $caseInsensitive): self |
||
79 | } |
||
80 |