lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chuck Williams" <ch...@manawiz.com>
Subject RE: I though I understood, but obviously I missed something.
Date Fri, 24 Dec 2004 17:05:19 GMT
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:jwl@sgi.com]
  > 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: lucene-user-unsubscribe@jakarta.apache.org
  > For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message