Re: Accessing the "contents" field

2002-03-14 Thread William W
st" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Subject: Accessing the "contents" field >Date: Thu, 14 Mar 2002 14:36:53 +1000 > >Hi, > >I would like to access the contents field of a document, fo rexample > >doc(i).get("contents&

Re: Accessing the "contents" field

2002-03-13 Thread Peter Carlson
Hi, Your adding the Field.Text(String, Reader) which does not store the field contents. See API docs. Either use doc.add(Field.Text(String,String)) or doc.add(new Field(String, String true, true, true)) To store, index and tokenize Hope this helps --Peter On 3/13/02 10:54 PM, "ROSHAN NAVEN

RE: Accessing the "contents" field

2002-03-13 Thread Sreenivasulu M
[EMAIL PROTECTED] > Subject: Re: Accessing the "contents" field > > Sunnetha, > > this is my Search code... I have tried the get("body") call but it returns > a Null. thus i cannot actually process document contents.. I need > to do this to extr

Re: Accessing the "contents" field

2002-03-13 Thread ROSHAN NAVENDRA
Sunnetha, this is my Search code... I have tried the get("body") call but it returns a Null. thus i cannot actually process document contents.. I need to do this to extract data such as document titles etc currently it uses get("path") to get the documents path but if I were to change

Re: Accessing the "contents" field

2002-03-13 Thread suneethad
Hi Roshan, U've got to get the contents as doc(i).get("body") The field name has to match what is queried back . Suneetha. NAVENDRA wrote: > It is being added as a Text field which is stored i gather. Is is also being >added as as a Reader..

Re: Accessing the "contents" field

2002-03-13 Thread ROSHAN NAVENDRA
It is being added as a Text field which is stored i gather. Is is also being added as as a Reader this might be the problem I am not sure. Here is my code, can anybody please help me. import org.apache.lucene.analysis.SimpleAnalyzer; import org.apache.lucene.index.IndexWriter; import or

Re: Accessing the "contents" field

2002-03-13 Thread Otis Gospodnetic
Make sure that you added it to the index as a stored field, and not just indexed. Look at the Javadoc for Field class to see different field types. Otis --- ROSHAN NAVENDRA <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to access the contents field of a document, fo rexample > > doc(i).get

Accessing the "contents" field

2002-03-13 Thread ROSHAN NAVENDRA
Hi, I would like to access the contents field of a document, fo rexample doc(i).get("contents") this should return a String (am i right?) but when I print it out I find that it is a Null. How do I go about accessing the contents of the file Rosh. -- To unsubscribe, e-mail: