You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by sd...@sina.com on 2012/09/29 09:02:58 UTC

回复:What's the purpose:Lucene document field index but not store?

你的两种,存储原文,不存储索引;和存储原文,存储不分析的索引。
当选定字段,参考作 主键 使用的时候,一般保存不分析的索引。也就是不使用分析器分析字符串,和产生标记流。
主键,全局唯一引用。
给出版本,代码。

----- 原始邮件 -----
发件人:娄建文 <to...@163.com>
收件人:general@lucene.apache.org
主题:What's the purpose:Lucene document field index but not store?
日期:2012年09月29日 13点52分


Re:回复:What's the purpose:Lucene document field index but not store?

Posted by 娄建文 <to...@163.com>.
好吧,用中文.我本来是想在索引中存储商品id,并且希望能通过索引来搜索:使用:
Field f = new Field("notindex","value",Store.YES,Index.NOT_ANALYZED);
但是用luke看不到索引的商品id内容,也无法进行搜索,正常理解应该是能看到商品id,并且能进行搜索.

所以有点不理解为什么不能这样来满足我的需求.你刚才的解释我没看明白.





|
娄建文Java工程师
手机:13261993265
公司:千品网(www.qianpin.com)
地址:北京市朝阳区安家楼路50号院A3楼
|

扫描该二维码,可以将电子名片迅速保存到手机 使用帮助

|



在 2012-09-29 15:02:58,sdrkyj@sina.com 写道:
>你的两种,存储原文,不存储索引;和存储原文,存储不分析的索引。
>当选定字段,参考作 主键 使用的时候,一般保存不分析的索引。也就是不使用分析器分析字符串,和产生标记流。
>主键,全局唯一引用。
>给出版本,代码。
>
>----- 原始邮件 -----
>发件人:娄建文 <to...@163.com>
>收件人:general@lucene.apache.org
>主题:What's the purpose:Lucene document field index but not store?
>日期:2012年09月29日 13点52分
>