writer = new IndexWriter(indexLocation, new
StandardAnalyzer(), true);
                String string = request.getParameter("text");
                this.log("Text is "+string);
                Date date = new Date();
                String dateString = DateTools.dateToString(date,
DateTools.Resolution.MINUTE);
                this.log("Date is "+dateString);
                Field allField = new Field("all", string, Field.Store.YES,
 Field.Index.TOKENIZED);
                Field dateField = new Field("date", dateString, Field.Store.YES,
 Field.Index.UN_TOKENIZED);
                doc.add(allField);
                doc.add(dateField);
                writer.addDocument(doc);
                writer.optimize();
                writer.close();

 This code is supposed to get information from a JSP (and does) and put
 it into a lucene index (and does) in a new document (and does not).
 This is apparent when I query it using luke and the default lucene web
 application. Any suggestions or pointers to what to do about this
 would be eternally helpful? Thanks in advance!
-- 
Cheers,
Hasan Diwan <[EMAIL PROTECTED]>

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

Reply via email to