All of your Document.add's need to be doc.add's. You are adding the field to the document, not the class.
Chuck > -----Original Message----- > From: Jim Lynch [mailto:[EMAIL PROTECTED] > Sent: Friday, December 24, 2004 8:30 AM > To: Lucene Users List > Subject: I though I understood, but obviously I missed something. > > A snippet from my program: > > Document doc = new Document(); > Field fContent = new > Field("content",content.toString(),false,true,true); > Field fTitle = new Field("title",title,true,true,true); > Field fDate = new Field("date",date,true,true,false); > Document.add(fContent); > Document.add(fTitle); > Document.add(fDate); > > Generate this (and other like it ) error > > method add(org.apache.lucene.document.Field) cannot be referenced from a > static context > [javac] Document.add(fContent); > > Where did I go wrong? > > > Thanks, > Jim. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]