如何在索引到弹性搜索之前对标记进行排序。就像。我要索引
"a b" => "ab"
"b a" => "ab"
"java language" => "javalanguage"
"requirement analysis" => "analysisrequirement"排序之后,我们将连接我们用例的所有令牌。
如何使用自定义排序分析器实现这一目标?
编辑:因此,我们已经应用了一对自定义分析器在弹性搜索映射我们的用例。就像。我们有
token
stemming
custom_words_concatenation我想用分析器对单词进行分类。就像下面,
token
stemming
sort
custom_words_concatenation发布于 2016-12-26 19:00:13
创建了一个自定义排序分析器。
链接github https://github.com/ranjeet-floyd/plugin-sortchar.git
将输入字符串转换为char[]并使用Arrays.sort进行排序。
例如:
requirement analysis => aaeeeiilmnnqrrsstuy
analysis requirement => aaeeeiilmnnqrrsstuyhttps://stackoverflow.com/questions/41289039
复制相似问题