lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eder" <>
Subject How to create fields from a txt file for Lucene indexing?
Date Fri, 27 Oct 2006 03:56:38 GMT
Hi all

I'd like to create fields based in a txt.file, like the foollowing example:

Author: Eder
Description: Indexing txt files in Lucene Tutorial
Category: Software Development

Author: Cecilia
Title: Preventioning Fever
Category: Health y Wellness

So, I'd like to create the fields "Author", "Description", "Title" and 
"Category" by reading the files. If I got the texts, I would do something 

Document doc = new Document( );
doc.add(New field("Author","Eder"));

But this info is in txt files, so how can I read the file and get the data?

Great Hugh,

Eder Rebou├žas dos Santos
Salvador / BA - Brasil 

View raw message