Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 30205 invoked from network); 24 Oct 2005 23:34:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Oct 2005 23:34:12 -0000 Received: (qmail 9665 invoked by uid 500); 24 Oct 2005 23:34:07 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 9637 invoked by uid 500); 24 Oct 2005 23:34:07 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 9626 invoked by uid 99); 24 Oct 2005 23:34:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Oct 2005 16:34:06 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [217.146.176.52] (HELO web26602.mail.ukl.yahoo.com) (217.146.176.52) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 24 Oct 2005 16:34:05 -0700 Received: (qmail 6290 invoked by uid 60001); 24 Oct 2005 23:33:44 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.de; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=fxxYVFRq4Gn2sF31fJqx1jRVQndFOM6rfapjunxj6BUyLuFzybKhZKHBdnHv2MTP27e0JakA2y5WpxbQGOhSSHciPqH7GuI7s5erIeOH1kVDY+DtnoanG0kNLJ0VILp+uu915SnMQJKdtMTxSBC8YcASzo/86cTB2L1ToBiYPwk= ; Message-ID: <20051024233344.6288.qmail@web26602.mail.ukl.yahoo.com> Received: from [80.108.142.59] by web26602.mail.ukl.yahoo.com via HTTP; Tue, 25 Oct 2005 01:33:44 CEST Date: Tue, 25 Oct 2005 01:33:44 +0200 (CEST) From: Samuel Jackson Subject: Indexing problem - empty index files! To: java-user@lucene.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi to all! I'm new to Lucene and wanted to create a sample application to index certain database fields. But there seems to be some problem because the created files in the index target directory are only 1kb --> So I don't get any results of course. Here is what I did - can anyone give me a hint whats wrong? for (Iterator iter = someData.iterator(); iter.hasNext(); ) { Item item = (Item) iter.next(); Document doc = new Document(); doc.add(Field.Text("id", Long.toString(item.getId()))); doc.add(Field.Text("title", item.getTitle())); doc.add(Field.Text("description", item.getTitle())); try { final IndexWriter writer = new IndexWriter(indexLocation, new StandardAnalyzer(), true); writer.addDocument(doc); writer.optimize(); writer.close(); indexCreated = true; } catch (IOException e) { e.printStackTrace(); } } ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org