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_TOKENIZED)); etc... On Nov 29, 2007 10:25 AM, Liaqat Ali <[EMAIL PROTECTED]> wrote: > 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])); > doc.add( Field.Text("city", text[i])); > writer.addDocument(doc); > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Regards, Shai Erera