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!!