Skip to content

Commit

Permalink
Use synonym graph instead of regular synonyms (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jade-GG authored Nov 28, 2024
1 parent c232028 commit 6567325
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Commands/ElasticsearchIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function prepare(string $indexName, array $mapping = [], array $settings
->map(fn ($synonym) => $synonym->synonyms)
->toArray();

data_set($settings, 'index.analysis.filter.synonym', ['type' => 'synonym', 'synonyms' => $synonyms]);
data_set($settings, 'index.analysis.filter.synonym', ['type' => 'synonym_graph', 'synonyms' => $synonyms]);
data_set($settings, 'index.analysis.analyzer.synonym', [
'filter' => ['lowercase', 'asciifolding', 'synonym'],
'tokenizer' => 'standard',
Expand Down

0 comments on commit 6567325

Please sign in to comment.