Solr 中 StandardTokenizerFactory 和 KeywordTokenizerFactory 之间的区别?
我是 Solr 新手。我想知道何时使用 StandardTokenizerFactory 和 KeywordTokenizerFactory?
我阅读了 Apache Wiki 上的文档,但我不明白。
谁能解释一下 StandardTokenizerFactory 和 KeywordTokenizerFactory 之间的区别?
I am new to Solr.I want to know when to use StandardTokenizerFactory and KeywordTokenizerFactory?
I read the docs on Apache Wiki, but I am not getting it.
Can anybody explain the difference between StandardTokenizerFactory and KeywordTokenizerFactory?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
标准TokenizerFactory:-
它对空白进行标记,并去除字符
文档:-
将其用于要搜索字段数据的字段。
例如 -
将生成 7 个标记(以逗号分隔) -
KeywordTokenizerFactory :-
Keyword Tokenizer 根本不会拆分输入。
不对字符串执行任何处理,整个字符串被视为单个实体。
这实际上并没有进行任何标记化。它将原始文本作为一个术语返回。
主要用于排序或分面需求,您希望在过滤多个单词和排序时匹配确切的分面,因为排序不适用于标记化字段。
例如
会生成一个令牌 -
StandardTokenizerFactory :-
It tokenizes on whitespace, as well as strips characters
Documentation :-
Would use this for fields where you want to search on the field data.
e.g. -
would generate 7 tokens (separated by comma) -
KeywordTokenizerFactory :-
Keyword Tokenizer does not split the input at all.
No processing in performed on the string, and the whole string is treated as a single entity.
This doesn't actually do any tokenization. It returns the original text as one term.
Mainly used for sorting or faceting requirements, where you want to match the exact facet when filtering on multiple words and sorting as sorting does not work on tokenized fields.
e.g.
would generate a single token -