Lines Matching refs:field
26 public function __construct(?string $field = null, $values = null)
28 if (null !== $field && null !== $values) {
29 $this->setParam($field, $values);
40 public function setField(string $field, $values): self
42 return $this->setParam($field, $values);
46 * Sets a param for the given field.
52 public function setFieldParam(string $field, string $key, $value): self
54 if (!isset($this->_params[$field])) {
55 $this->_params[$field] = [];
58 $this->_params[$field][$key] = $value;
68 public function setFieldQuery(string $field, string $query): self
70 return $this->setFieldParam($field, 'query', $query);
74 * Set field operator.
78 public function setFieldOperator(string $field, string $operator = self::OPERATOR_OR): self
80 return $this->setFieldParam($field, 'operator', $operator);
84 * Set field analyzer.
88 public function setFieldAnalyzer(string $field, string $analyzer): self
90 return $this->setFieldParam($field, 'analyzer', $analyzer);
94 * Set field boost value.
100 public function setFieldBoost(string $field, float $boost = 1.0): self
102 return $this->setFieldParam($field, 'boost', $boost);
106 * Set field minimum should match.
114 public function setFieldMinimumShouldMatch(string $field, $minimumShouldMatch): self
116 return $this->setFieldParam($field, 'minimum_should_match', $minimumShouldMatch);
120 * Set field fuzziness.
126 public function setFieldFuzziness(string $field, $fuzziness): self
128 return $this->setFieldParam($field, 'fuzziness', $fuzziness);
132 * Set field fuzzy rewrite.
136 public function setFieldFuzzyRewrite(string $field, string $fuzzyRewrite): self
138 return $this->setFieldParam($field, 'fuzzy_rewrite', $fuzzyRewrite);
142 * Set field prefix length.
146 public function setFieldPrefixLength(string $field, int $prefixLength): self
148 return $this->setFieldParam($field, 'prefix_length', $prefixLength);
152 * Set field max expansions.
156 public function setFieldMaxExpansions(string $field, int $maxExpansions): self
158 return $this->setFieldParam($field, 'max_expansions', $maxExpansions);
168 public function setFieldZeroTermsQuery(string $field, string $zeroTermQuery = self::ZERO_TERM_NONE): self
170 return $this->setFieldParam($field, 'zero_terms_query', $zeroTermQuery);
180 public function setFieldCutoffFrequency(string $field, float $cutoffFrequency): self
184 return $this->setFieldParam($field, 'cutoff_frequency', $cutoffFrequency);