You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by 齐保元 <qi...@126.com> on 2012/07/24 14:01:02 UTC

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@126.com

Re:LongField problem in Lucene4

Posted by 齐保元 <qi...@126.com>.
solved!
      use this code: doc.getField("docID").numericValue();



在 2012-07-24 20:01:02,"" <qi...@126.com> :
>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?
>
>
>--
>