Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

LongField problem in Lucene4

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


qibaoyuan at 126

Jul 24, 2012, 5:01 AM

Post #1 of 2 (138 views)
Permalink
LongField problem in Lucene4

index:
doc.add(new LongField("docID", indexData.getDocId(), Field.Store.YES));
search:
doc.get("docID");//here,it gets null
why is the result is null?anyone could help me out?


--

____________________________________________
齐保元(Qi Baoyuan)
中科院计算技术研究所 智能信息处理重点实验室(ICT,NKI,GUCAS,Beijing,China)
手机:15120084688
E-Mail:qibaoyuan [at] 126


qibaoyuan at 126

Jul 24, 2012, 5:15 AM

Post #2 of 2 (134 views)
Permalink
Re:LongField problem in Lucene4 [In reply to]

solved!
use this code: doc.getField("docID").numericValue();



在 2012-07-24 20:01:02,"" <qibaoyuan [at] 126> :
>index:
> doc.add(new LongField("docID", indexData.getDocId(), Field.Store.YES));
>search:
> doc.get("docID");//here,it gets null
> why is the result is null?anyone could help me out?
>
>
>--
>

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.