Laravel弹性搜索工具soundex

Laravel elastic search implement soundex

我在弹性搜索中遇到一个问题,如果有人输入错误的拼写,它就无法搜索。我已经对弹性搜索上的 Soundex. Now I'm facing an issue to implement Soundex on elastic search. Please help me to do that, I've already installed Phonetic Anaalysis 插件进行了一些研发,但是如何使用弹性搜索配置插件以处理搜索结果。

'title' => [
                    'type' => 'text',
                    'analyzer' => $language . '_analyzer',
                    'index' => true,
                    'norms' => false,
                    'term_vector' => 'with_positions_offsets',
                    'fields' => [
                        'raw' => [
                            'type' => 'keyword',
                            'normalizer' => 'lowercase_normalizer',
                            'index' => true,
                            'norms' => false,
                        ],
                    ],
                ],

您需要创建一个 custom analyzer using phonetic token filter and the apply this custom analyzer to your text field

或者,如果您想使用错误类型进行搜索,您可以使用 fuzzy matches