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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]