I am using lucene for indexing and searching on client side after searching the keyword i want to display the html files there . So is there any way to store and access the html files . actually the html files are storing images and links and they should be opened in the java api as normal html file . I am using the following code for lucene indexing
try
{
IndexWriter indexWriter = new IndexWriter(
FSDirectory.open(indexDir),
new SimpleAnalyzer(),
true,
IndexWriter.MaxFieldLength.LIMITED);
indexWriter.setUseCompoundFile(false);
indexDirectory(indexWriter, dataDir, suffix);
Document doc = new Document();
doc.add(new Field("contents", new FileReader(f)));
doc.add(new Field("filename",f.getCanonicalPath(),
Field.Store.YES,Field.Index.ANALYZED));
indexWriter.addDocument(doc);
numIndexed = indexWriter.maxDoc();
indexWriter.optimize();
indexWriter.close();
}
catch(Exception ex)
{
}
How should i display the html files matching the search criteria on client side