Which Lucene version do you use?
If it's 2.2, then Field.Keyword, Field.UnIndexed etc. we removed.
You should instead do:
Document doc = new Document();
doc.add(new Field("id", keywords[i], Store.NO, Index.UN_TOKENIZED));
doc.add(new Field("country", unindexed[i], Store.YES,
Index.UN_TOK
This code generate error, kindly tell me that what parameters will be
use when we use constructors.
Document doc = new Document();
doc.add( Field.Keyword("id", keywords[i]));
doc.add( Field.UnIndexed("country", unindexed[i]));
doc.add(Field.UnStored("contents", unstored[i]));