lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Indexing txt-files
Date Thu, 30 Oct 2003 12:19:16 GMT
Strange.  FileReader works fine in my java.net article code.


On Thursday, October 30, 2003, at 06:35  AM, Otis Gospodnetic wrote:

> This is from Lucene demo, included in Lucene distribution.
> Look at FileDocument class:
>
>     // Add the contents of the file a field named "contents".  Use a
> Text
>     // field, specifying a Reader, so that the text of the file is
> tokenized.
>     // ?? why doesn't FileReader work here ??
>     FileInputStream is = new FileInputStream(f);
>     Reader reader = new BufferedReader(new InputStreamReader(is));
>     doc.add(Field.Text("contents", reader));
>
> Otis
>


---------------------------------------------------------------------
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