My problem is before that. I only get one field, the "filename" field... the
"contents" field is totally missing and I have no idea why...

Ralf

> I believe since you created the field using a Reader, you have to use the 
> Field.readerValue() method instead of the stringValue() method and then 
> handle the reader appropriately.  I don't know if there is anyway to 
> determine which one is used for a given field other than to test for null 
> on the readerValue()?????  
> 
> -Grant
> 
> >>> [EMAIL PROTECTED] 01/05/04 11:27AM >>>
> Hi Group,
> 
> I have a little problem which is able of being solved easily from the
> expertise within this group. 
> 
> A index has beein generated. The document used looks like this:
> 
> Document doc = new Document();
> doc.add(Field.Text("contents", new FileReader(file)));
> doc.add(Field.Keyword("filename", file.getCanonicalPath())); 
> 
> 
> When I now search, I get a correct hit. However it seems the "contents"
> field does not exist. When I get the field, only "filename" exists...
> 
> Here some code how I parse the hits object:
> 
> Document d = hits.doc(0);
> Enumeration enum = d.fields();
> while (enum.hasMoreElements()){
>   Field f = (Field)enum.nextElement();
>   System.out.println("Field value = " + f.stringValue()); 
> }
> 
> Where is the problem? 
> 
> Ralf
> 
> 
> -- 
> +++ GMX - die erste Adresse f�r Mail, Message, More +++
> Neu: Preissenkung f�r MMS und FreeMMS! http://www.gmx.net 
> 
> 
> 
> ---------------------------------------------------------------------
> 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]
> 

-- 
+++ GMX - die erste Adresse f�r Mail, Message, More +++
Neu: Preissenkung f�r MMS und FreeMMS! http://www.gmx.net



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to