"Turn" Lucene different version of the field keyword, unindex, resulting in Lucene indexing always error urgent!!

Source: Internet
Author: User

Lucene indexing always error urgent!! Http://zhidao.baidu.com/link?url=iaVs9JH4DfN6iwaWImt7VMJENWCWGGaWFGPjqhUw_ JZ7FSBDRUIAJWPTGCNDR8OHWLJ8IUARECKLNPBQGGZTXQ
This paragraph always error, compile not pass. The red line is drawn below the keyword,text.
while (Rs.next ()) {
Document Doc=new document ();
Doc.add (Field.keyword ("BH", rs.getstring ("BH"));
Doc.add (Field.text ("YHM", Rs.getstring ("YHM"));
Doc.add (field.unindexed ("YHGB", Rs.getstring ("YHGB"));
Doc.add (field.unindexed ("Ssxy", Rs.getstring ("Ssxy"));
Doc.add (Field.text ("Sfqy", Rs.getstring ("sfqy"));
Writer.adddocument (DOC);
}

There is a master who can help me!! Thanks, man.
Share to: The questioner is adopted by
Version mismatch: lucene1.* code, lucene2.* jar Package
-------------------------------------
After 2.*:
Keyword corresponds to Field.Store.YES, Field.Index.UN_TOKENIZED,
unindexed corresponds to Field.Store.YES, Field.Index.NO,
unstored corresponds to Field.Store.NO, Field.Index.TOKENIZED,
Text corresponds to Field.Store.YES, Field.Index.TOKENIZED.

"Turn" Lucene different version of the field keyword, unindex, resulting in Lucene indexing always error urgent!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.