On Sunday, October 5, 2003, at 09:56 AM, Mike Hogan wrote:
I am trying to test this:

public void index(String componentId, String componentDescription) throws
SearchService.Exception {
IndexWriter writer = null;
try {
writer = new IndexWriter(INDEX_FILE_PATH, new
StandardAnalyzer(), !indexExists());
final Document document = new Document();
document.add(Field.Text("id", componentId));
document.add(Field.Text("contents", componentDescription));
writer.addDocument(document);
writer.optimize();
writer.close();
} catch (IOException e) {
throw new SearchService.Exception("Exception updating Lucene
index", e);
}
}

Looks pretty much like you're testing Lucene here, not your application around it.... nothing inside the try block is your own stuff its just Lucene API calls.



What ya reckon?

I reckon ya oughta have a look at Lucene's test cases and source code. Ever hear of RAMDirectory?! :))


Erik



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



Reply via email to