Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 72248 invoked from network); 30 Oct 2003 08:27:43 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 30 Oct 2003 08:27:43 -0000 Received: (qmail 76533 invoked by uid 500); 30 Oct 2003 08:27:15 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 76507 invoked by uid 500); 30 Oct 2003 08:27:14 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 76494 invoked from network); 30 Oct 2003 08:27:14 -0000 Received: from unknown (HELO c000.snv.cp.net) (209.228.32.64) by daedalus.apache.org with SMTP; 30 Oct 2003 08:27:14 -0000 Received: (cpmta 28442 invoked from network); 30 Oct 2003 00:27:26 -0800 Received: from 24.51.109.181 (HELO ehatchersolutions.com) by smtp.hatcher.net (209.228.32.64) with SMTP; 30 Oct 2003 00:27:26 -0800 X-Sent: 30 Oct 2003 08:27:26 GMT Date: Thu, 30 Oct 2003 03:27:32 -0500 Subject: Re: Indexing txt-files Content-Type: text/plain; charset=ISO-8859-1; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Erik Hatcher To: "Lucene Users List" Content-Transfer-Encoding: quoted-printable In-Reply-To: <003a01c39eb9$21f4de20$1a0011ac@TFEW02> Message-Id: X-Mailer: Apple Mail (2.552) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Also, referring to my article may help - the code is designed to index=20= text files: http://today.java.net/pub/a/today/2003/07/30/LuceneIntro.html On Thursday, October 30, 2003, at 02:40 AM, G=FCnter Kukies wrote: > Hello, > > I want to add a Text field to a LUCENE Document. I checked the index=20= > with LUKE, but I don't get any results for search in the contents=20 > Field. The test.txt is a simple ASCII-File. SimpleAnalyzer is used on=20= > both sides search and index. > > Here are the relevant code snippets: > > > File file =3D new File("/documents/test.txt"); > > addContent(document, new FileInputStream( file )); > > > private static void addContent(Document document, InputStream is)=20 > throws IOException { > try { > InputStreamReader input =3D new InputStreamReader(is); > document.add(Field.Text("contents", input )); > } > catch(Exception ex) { > ex.printStackTrace(); > } > finally { > if( is !=3D null ) { > is.close(); > } > } > } > > > Thanks for your help > > G=FCnter= --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org