Skip to content

Commit 33773c7

Browse files
committed
Added ability to change analyzer
1 parent 251cae0 commit 33773c7

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

src/Query/Match.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ public function __construct(
5656
}
5757

5858

59+
public function changeAnalyzer(string $newAnalyzer): void
60+
{
61+
$this->analyzer = $newAnalyzer;
62+
}
63+
64+
5965
public function key(): string
6066
{
6167
return 'match_' . $this->field . '_' . (string) $this->query;

src/Query/MatchPhrase.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ public function __construct(
5454
}
5555

5656

57+
public function changeAnalyzer(string $newAnalyzer): void
58+
{
59+
$this->analyzer = $newAnalyzer;
60+
}
61+
62+
5763
public function key(): string
5864
{
5965
return 'match_phrase_' . $this->field . '_' . (string) $this->query;

src/Query/MultiMatch.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ public function __construct(
6565
}
6666

6767

68+
public function changeAnalyzer(string $newAnalyzer): void
69+
{
70+
$this->analyzer = $newAnalyzer;
71+
}
72+
73+
6874
public function key(): string
6975
{
7076
return 'multiMatch_' . \implode('-', $this->fields) . '_' . (string) $this->query;

0 commit comments

Comments
 (0)