Skip to content

Commit

Permalink
Use lowercase tokenizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Jade-GG authored Jan 25, 2024
1 parent 9b81281 commit 6048413
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 @@ -78,7 +78,7 @@ public function prepare(string $indexName, array $mapping = [], array $settings
->toArray();

data_set($settings, 'index.analysis.filter.synonym', ['type' => 'synonym', 'synonyms' => $synonyms]);
data_set($settings, 'index.analysis.analyzer.synonym', ['tokenizer' => 'whitespace', 'filter' => ['synonym']]);
data_set($settings, 'index.analysis.analyzer.synonym', ['tokenizer' => 'lowercase', 'filter' => ['synonym']]);

foreach ($synonymsFor as $property) {
data_set($mapping, 'properties.' . $property . '.type', 'text');
Expand Down

0 comments on commit 6048413

Please sign in to comment.