首页 新闻 会员 周边

lucene7.4.0版本设置字段不分词,没有找到相关的类

0
[已关闭问题] 关闭于 2018-08-07 17:20

我是用Field.Index没有发现这个静态属性了。Field中只有Store。现在要设置不分词字段应该怎么设置呢?谢谢!

and技术梦的主页 and技术梦 | 初学一级 | 园豆:7
提问于:2018-08-07 16:36
< >
分享
所有回答(2)
0

不同的字段类型,有些会分词,有些不会分词

and技术梦 | 园豆:7 (初学一级) | 2018-08-07 17:19
0

建索引的时候字段用StringField就行了。
A field that is indexed but not tokenized: the entire String value is indexed as a single token.
http://lucene.apache.org/core/7_5_0/core/org/apache/lucene/document/StringField.html

客家岸田 | 园豆:404 (菜鸟二级) | 2018-09-30 11:45
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册